[][src]Struct async_resource::PoolConfig

pub struct PoolConfig<T: Send, E> { /* fields omitted */ }

Implementations

impl<T: Send, E> PoolConfig<T, E>[src]

pub fn new<C, F>(create: C) -> Self where
    C: Fn() -> F + Send + Sync + 'static,
    F: TryFuture<Ok = T, Error = E> + Send + 'static,
    T: Send + 'static,
    E: 'static, 
[src]

pub fn acquire_timeout(self, val: Duration) -> Self[src]

pub fn dispose<F>(self, dispose: F) -> Self where
    F: Fn(T, ResourceInfo) + Send + Sync + 'static, 
[src]

pub fn handle_error<F>(self, handler: F) -> Self where
    F: Fn(E) + Send + Sync + 'static, 
[src]

pub fn idle_timeout(self, val: Duration) -> Self[src]

pub fn verify<V, F>(self, verify: V) -> Self where
    V: Fn(&mut T, ResourceInfo) -> F + Send + Sync + 'static,
    F: TryFuture<Ok = Option<T>, Error = E> + Send + 'static,
    T: Send + 'static,
    E: 'static, 
[src]

pub fn max_count(self, val: usize) -> Self[src]

pub fn max_waiters(self, val: usize) -> Self[src]

pub fn min_count(self, val: usize) -> Self[src]

pub fn release<F>(self, release: F) -> Self where
    F: Fn(&mut T, ResourceInfo) -> bool + Send + Sync + 'static, 
[src]

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

Auto Trait Implementations

impl<T, E> !RefUnwindSafe for PoolConfig<T, E>

impl<T, E> Send for PoolConfig<T, E>

impl<T, E> Sync for PoolConfig<T, E>

impl<T, E> Unpin for PoolConfig<T, E>

impl<T, E> !UnwindSafe for PoolConfig<T, E>

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.