[][src]Trait unique::Allocator

pub trait Allocator<T: Eq>: Default {
    fn allocate(&self, t: T) -> Id<T>;
fn allocations(&self) -> usize;
fn delete_unused(&self); }

Allocate shared unique pointers

Required methods

fn allocate(&self, t: T) -> Id<T>

Recycle a value if possible, or allocate a new one

fn allocations(&self) -> usize

The current number of allocations

fn delete_unused(&self)

Sweep for unused values and delete them

Loading content...

Implementors

impl<T: Eq + Hash> Allocator<T> for HashAllocator<T>[src]

Loading content...