pub struct MultiplexResource<R: Send + Sync> { /* private fields */ }Expand description
Weak driver-side control of one registration. Capacity updates and retirement wake acquirers even when no use has completed. No shared mutable resource reference is exposed by the pool.
Implementations§
Source§impl<R: Send + Sync> MultiplexResource<R>
impl<R: Send + Sync> MultiplexResource<R>
pub fn id(&self) -> ResourceId
pub fn retire(&self) -> bool
Sourcepub fn update(&self, admission: Admission) -> bool
pub fn update(&self, admission: Admission) -> bool
Publish current protocol/local admission. Decreases do not terminate uses already active; outstanding reservations are revalidated at activation.
pub fn try_abandoned(&self) -> Option<MultiplexAbandonedUse<R>>
Sourcepub async fn next_abandoned(
&self,
cancel: &Cancellation,
) -> Result<Option<MultiplexAbandonedUse<R>>, Error>
pub async fn next_abandoned( &self, cancel: &Cancellation, ) -> Result<Option<MultiplexAbandonedUse<R>>, Error>
The driver receives abandoned uses, performs protocol cleanup/reset, then
acknowledges completion. None means the registration has retired.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for MultiplexResource<R>
impl<R> RefUnwindSafe for MultiplexResource<R>where
Weak<Core<MultiSlot<R>>>: RefUnwindSafe,
impl<R> Send for MultiplexResource<R>
impl<R> Sync for MultiplexResource<R>
impl<R> Unpin for MultiplexResource<R>
impl<R> UnsafeUnpin for MultiplexResource<R>where
Weak<Core<MultiSlot<R>>>: UnsafeUnpin,
impl<R> UnwindSafe for MultiplexResource<R>where
Weak<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