#[non_exhaustive]pub enum StashResult<M> {
Stashed {
depth: usize,
},
Rejected(M),
DroppedOldest(M),
DroppedNewest,
}Expand description
Result of BoundedStash::stash.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stashed
Stashed successfully; depth is the new buffer length.
Rejected(M)
Reject policy refused the message; caller must route it
(e.g. publish on DeadLetters).
DroppedOldest(M)
DropOldest displaced an existing message; caller may want
to surface it on DeadLetters.
DroppedNewest
DropNewest discarded the incoming message — depth unchanged.
Trait Implementations§
Source§impl<M: Clone> Clone for StashResult<M>
impl<M: Clone> Clone for StashResult<M>
Source§fn clone(&self) -> StashResult<M>
fn clone(&self) -> StashResult<M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M: Debug> Debug for StashResult<M>
impl<M: Debug> Debug for StashResult<M>
Source§impl<M: PartialEq> PartialEq for StashResult<M>
impl<M: PartialEq> PartialEq for StashResult<M>
impl<M: Eq> Eq for StashResult<M>
impl<M> StructuralPartialEq for StashResult<M>
Auto Trait Implementations§
impl<M> Freeze for StashResult<M>where
M: Freeze,
impl<M> RefUnwindSafe for StashResult<M>where
M: RefUnwindSafe,
impl<M> Send for StashResult<M>where
M: Send,
impl<M> Sync for StashResult<M>where
M: Sync,
impl<M> Unpin for StashResult<M>where
M: Unpin,
impl<M> UnsafeUnpin for StashResult<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for StashResult<M>where
M: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.