Struct poison_pool::PoisonPool [] [src]

pub struct PoisonPool<T> { /* fields omitted */ }

A pool that contains elements that can be recycled when they are finished being used.

Methods

impl<T> PoisonPool<T>
[src]

Creates a new PoisonPool with a given size and where each element is initialized by the init function.

Returns an unpoisoned item from the pool if possible.

Returns an unpoisoned item from the pool, or a given value, if one is not available.

Returns an unpoisoned item from the pool, or value generated by the function f if one is not available

Removes poison from all the internal items

Trait Implementations

impl<T: Clone> Clone for PoisonPool<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more