pub struct MultiplexPool<R: Send + Sync> { /* private fields */ }Expand description
Shared resources with non-cloneable use reservations. The protocol owner validates and activates reservations while committing the actual operation.
Implementations§
Source§impl<R: Send + Sync> MultiplexPool<R>
impl<R: Send + Sync> MultiplexPool<R>
pub fn new(options: Options) -> Result<Self, Error>
pub async fn acquire_or_reserve( &self, cancel: &Cancellation, ) -> Result<Acquisition<MultiplexReservation<R>, MultiplexBuildPermit<R>>, Error>
pub fn begin_close(&self)
pub fn stats(&self) -> Stats
pub fn prune(&self, retain: usize) -> usize
pub fn try_retirement(&self) -> Option<Retirement<Arc<R>>>
pub async fn next_retirement( &self, cancel: &Cancellation, ) -> Result<Option<Retirement<Arc<R>>>, Error>
pub async fn wait_closed(&self, cancel: &Cancellation) -> Result<(), Error>
Trait Implementations§
Source§impl<R: Send + Sync> Pool for MultiplexPool<R>
impl<R: Send + Sync> Pool for MultiplexPool<R>
type Permit = MultiplexReservation<R>
type BuildPermit = MultiplexBuildPermit<R>
async fn acquire_or_reserve( &self, cancel: &Cancellation, ) -> Result<Acquisition<Self::Permit, Self::BuildPermit>, Error>
fn begin_close(&self)
fn stats(&self) -> Stats
Auto Trait Implementations§
impl<R> Freeze for MultiplexPool<R>
impl<R> RefUnwindSafe for MultiplexPool<R>where
Arc<Core<MultiSlot<R>>>: RefUnwindSafe,
impl<R> Send for MultiplexPool<R>
impl<R> Sync for MultiplexPool<R>
impl<R> Unpin for MultiplexPool<R>
impl<R> UnsafeUnpin for MultiplexPool<R>where
Arc<Core<MultiSlot<R>>>: UnsafeUnpin,
impl<R> UnwindSafe for MultiplexPool<R>where
Arc<Core<MultiSlot<R>>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more