[−][src]Struct async_resource::PoolConfig
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]
C: Fn() -> F + Send + Sync + 'static,
F: TryFuture<Ok = T, Error = E> + Send + 'static,
T: Send + 'static,
E: 'static,
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]
F: Fn(T, ResourceInfo) + Send + Sync + 'static,
pub fn handle_error<F>(self, handler: F) -> Self where
F: Fn(E) + Send + Sync + 'static,
[src]
F: Fn(E) + Send + Sync + 'static,
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]
V: Fn(&mut T, ResourceInfo) -> F + Send + Sync + 'static,
F: TryFuture<Ok = Option<T>, Error = E> + Send + 'static,
T: Send + 'static,
E: 'static,
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]
F: Fn(&mut T, ResourceInfo) -> bool + Send + Sync + 'static,
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]
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,
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.
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>,