pub trait ObjectPool: Send + Sync {
type Item: Send + Unpin;
type AcquireFuture: Future<Output = Self::Item> + Send;
// Required method
fn acquire(&self) -> Self::AcquireFuture;
}
Expand description
An object pool.
Required Associated Types§
Sourcetype AcquireFuture: Future<Output = Self::Item> + Send
type AcquireFuture: Future<Output = Self::Item> + Send
Type of future returned by acquire
.
Required Methods§
Sourcefn acquire(&self) -> Self::AcquireFuture
fn acquire(&self) -> Self::AcquireFuture
Acquires an item from the object pool.