pub struct Reservation<S: OutboxSink> { /* private fields */ }Expand description
Capacity an Outbox admitted ahead of staging, from Outbox::reserve.
Each Reservation::stage spends one slot; dropping the reservation
releases the slots it never spent. A value carrying a reservation, such as
a write that hands off to a second outbox, holds that capacity until the
value is staged or dropped.
Implementations§
Source§impl<S: OutboxSink> Reservation<S>
impl<S: OutboxSink> Reservation<S>
Sourcepub fn stage(&self, tenant: DataTenantId, item: impl Into<S::Item>)
pub fn stage(&self, tenant: DataTenantId, item: impl Into<S::Item>)
Stages one item for tenant on a reserved slot without waiting.
With no slot left, the item is staged like Outbox::stage. Once
shutdown has begun the item is counted lost, as any late stage is.
Trait Implementations§
Source§impl<S: OutboxSink> Debug for Reservation<S>
Names the outbox and the unspent slots, never the outbox’s contents.
impl<S: OutboxSink> Debug for Reservation<S>
Names the outbox and the unspent slots, never the outbox’s contents.
Source§impl<S: OutboxSink> Drop for Reservation<S>
Releases the slots this reservation never spent.
impl<S: OutboxSink> Drop for Reservation<S>
Releases the slots this reservation never spent.
Auto Trait Implementations§
impl<S> !Freeze for Reservation<S>
impl<S> RefUnwindSafe for Reservation<S>
impl<S> Send for Reservation<S>
impl<S> Sync for Reservation<S>
impl<S> Unpin for Reservation<S>
impl<S> UnsafeUnpin for Reservation<S>
impl<S> UnwindSafe for Reservation<S>
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