[−][src]Struct lifeguard::PoolBuilder
Used to define settings for and ultimately create a Pool
.
Fields
starting_size: usize
max_size: usize
supplier: Option<Box<dyn Supply<Output = T>>>
Implementations
impl<T> PoolBuilder<T> where
T: Recycleable,
[src]
T: Recycleable,
pub fn with<U>(self, option_setter: U) -> PoolBuilder<T> where
U: OptionSetter<PoolBuilder<T>>,
[src]
U: OptionSetter<PoolBuilder<T>>,
pub fn build(self) -> Pool<T> where
T: Recycleable,
[src]
T: Recycleable,
Trait Implementations
impl<T> OptionSetter<PoolBuilder<T>> for StartingSize where
T: Recycleable,
[src]
T: Recycleable,
pub fn set_option(self, builder: PoolBuilder<T>) -> PoolBuilder<T>
[src]
impl<T> OptionSetter<PoolBuilder<T>> for MaxSize where
T: Recycleable,
[src]
T: Recycleable,
pub fn set_option(self, builder: PoolBuilder<T>) -> PoolBuilder<T>
[src]
impl<T, S> OptionSetter<PoolBuilder<T>> for Supplier<S> where
S: Supply<Output = T> + 'static,
T: Recycleable,
[src]
S: Supply<Output = T> + 'static,
T: Recycleable,
pub fn set_option(self, builder: PoolBuilder<T>) -> PoolBuilder<T>
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,