[][src]Trait nitric_component::allocator::Create

pub trait Create<ID>: Allocator<ID> where
    ID: Id<Allocator = Self>, 
{ fn create(&mut self) -> Result<ID, OomError>; }

Trait implemented by allocators that can create new IDs, atomically and without additional arguments.

Required Methods

Creates a new ID of type ID.

In case your allocator supports atomic ID creation, you should implement this for &Self, too.


impl Create<FlatUsize> for FlatAllocator