Struct objpool::Pool [] [src]

pub struct Pool<T> {
    // some fields omitted
}

Methods

impl<T> Pool<T>
[src]

fn new<C>(constructor: C) -> Arc<Pool<T>> where C: Fn() -> T + Send + Sync + 'static

fn with_capacity<C>(capacity: usize, constructor: C) -> Arc<Pool<T>> where C: Fn() -> T + Send + Sync + 'static

fn get(&self) -> Item<T>

fn get_timeout(&self, duration: Duration) -> Result<Item<T>, TimeoutError>

Trait Implementations

impl<T> Debug for Pool<T>
[src]

fn fmt(&self, fmt: &mut Formatter) -> Result

Formats the value using the given formatter.