Struct swimmer::PoolBuilder[][src]

pub struct PoolBuilder<T: Recyclable> { /* fields omitted */ }

A pool builder, used to configure various pool settings.

Implementations

impl<T> PoolBuilder<T> where
    T: Recyclable
[src]

pub fn with_starting_size(self, starting_size: usize) -> Self[src]

See Pool::with_size.

pub fn with_supplier<S>(self, supplier: S) -> Self where
    S: Fn() -> T + Send + Sync + 'static, 
[src]

Uses the given closure for initializing new objects in the pool.

pub fn build(self) -> Pool<T>[src]

Builds a pool using the configured settings.

pub fn build_with(self, items: Vec<T>) -> Pool<T>[src]

Builds a pool using the configured settings, and fill it with the given items.

Trait Implementations

impl<T> Default for PoolBuilder<T> where
    T: Recyclable
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for PoolBuilder<T>[src]

impl<T> Send for PoolBuilder<T>[src]

impl<T> Sync for PoolBuilder<T>[src]

impl<T> Unpin for PoolBuilder<T>[src]

impl<T> !UnwindSafe for PoolBuilder<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.