Function lifeguard::pool [] [src]

pub fn pool<T>() -> PoolBuilder<T> where T: Recycleable

Produces a PoolBuilder instance

Example

extern crate lifeguard;
use lifeguard::*;

fn main() {
  let mut pool: Pool<String> = pool()
    .with(StartingSize(128))
    .with(MaxSize(4096))
    .with(Supplier(|| String::with_capacity(1024)))
    .build();
}