pub struct MemoryRealtimeDelivery<M> { /* private fields */ }Expand description
Runtime-independent bounded or unbounded outbound delivery recorder.
Bounded instances expose the contract semantics of wait, reject, and drop backpressure. Draining the queue wakes pending waiters.
Implementations§
Source§impl<M> MemoryRealtimeDelivery<M>
impl<M> MemoryRealtimeDelivery<M>
Sourcepub const fn bounded(capacity: NonZeroUsize) -> Self
pub const fn bounded(capacity: NonZeroUsize) -> Self
Creates a recorder with explicit non-zero queue capacity.
Sourcepub fn len(&self) -> SoapResult<usize>
pub fn len(&self) -> SoapResult<usize>
Returns the current accepted queue length.
Sourcepub fn is_empty(&self) -> SoapResult<bool>
pub fn is_empty(&self) -> SoapResult<bool>
Reports whether no accepted deliveries are queued.
Sourcepub fn drain(&self) -> SoapResult<Vec<OutboundDelivery<M>>>
pub fn drain(&self) -> SoapResult<Vec<OutboundDelivery<M>>>
Removes every accepted delivery in enqueue order and wakes waiters.
Trait Implementations§
Source§impl<M> Default for MemoryRealtimeDelivery<M>
impl<M> Default for MemoryRealtimeDelivery<M>
Source§impl<M> RealtimeDelivery<M> for MemoryRealtimeDelivery<M>where
M: Send,
impl<M> RealtimeDelivery<M> for MemoryRealtimeDelivery<M>where
M: Send,
Source§fn deliver(
&self,
delivery: OutboundDelivery<M>,
) -> BoxFuture<'_, SoapResult<DeliveryOutcome>>
fn deliver( &self, delivery: OutboundDelivery<M>, ) -> BoxFuture<'_, SoapResult<DeliveryOutcome>>
Delivers one message or reports a safe failure. Read more
Auto Trait Implementations§
impl<M> !Freeze for MemoryRealtimeDelivery<M>
impl<M> RefUnwindSafe for MemoryRealtimeDelivery<M>
impl<M> Send for MemoryRealtimeDelivery<M>where
M: Send,
impl<M> Sync for MemoryRealtimeDelivery<M>where
M: Send,
impl<M> Unpin for MemoryRealtimeDelivery<M>where
M: Unpin,
impl<M> UnsafeUnpin for MemoryRealtimeDelivery<M>
impl<M> UnwindSafe for MemoryRealtimeDelivery<M>
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