[][src]Struct lifeguard::PoolBuilder

pub struct PoolBuilder<T> where
    T: Recycleable
{ pub starting_size: usize, pub max_size: usize, pub supplier: Option<Box<dyn Supply<Output = T>>>, }

Used to define settings for and ultimately create a Pool.

Fields

starting_size: usizemax_size: usizesupplier: Option<Box<dyn Supply<Output = T>>>

Implementations

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

pub fn with<U>(self, option_setter: U) -> PoolBuilder<T> where
    U: OptionSetter<PoolBuilder<T>>, 
[src]

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

Trait Implementations

impl<T> OptionSetter<PoolBuilder<T>> for StartingSize where
    T: Recycleable
[src]

impl<T> OptionSetter<PoolBuilder<T>> for MaxSize where
    T: Recycleable
[src]

impl<T, S> OptionSetter<PoolBuilder<T>> for Supplier<S> where
    S: Supply<Output = T> + 'static,
    T: Recycleable
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for PoolBuilder<T>

impl<T> !Send for PoolBuilder<T>

impl<T> !Sync for PoolBuilder<T>

impl<T> Unpin for PoolBuilder<T>

impl<T> !UnwindSafe for PoolBuilder<T>

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.