Struct crayon::utils::object_pool::ObjectPool [] [src]

pub struct ObjectPool<T: Sized> { /* fields omitted */ }

A named object collections. Every time u create or free a handle, a attached instance T will be created/ freed.

Methods

impl<T: Sized> ObjectPool<T>
[src]

[src]

Constructs a new, empty ObjectPool.

[src]

Constructs a new ObjectPool with the specified capacity.

[src]

Creates a T and named it with Handle.

[src]

Returns mutable reference to internal value with name Handle.

[src]

Returns immutable reference to internal value with name Handle.

[src]

Returns true if this Handle was created by ObjectPool, and has not been freed yet.

[src]

Recycles the value with name Handle.

[src]

Remove all objects matching with predicate from pool incrementally.

[src]

Returns the total number of alive handle in this ObjectPool.

[src]

Returns an iterator over the ObjectPool.