#[non_exhaustive]pub enum TrySendError<T> {
Full(T),
Contended(T),
MaintenanceRequired(T),
Closed(T),
Revoked(T),
WaitersFull(T),
SequenceExhausted(T),
}Expand description
A rejected publication. Every variant retains the unaccepted payload.
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.
Full(T)
A required receiver prevents overwriting retained data.
Contended(T)
Another operation owns the stream’s synchronization state.
MaintenanceRequired(T)
Eligible retained storage needs caller-driven reclamation before retrying.
Closed(T)
The endpoint is closed.
Revoked(T)
The endpoint’s authority has been revoked.
WaitersFull(T)
No bounded waiter record is available.
SequenceExhausted(T)
The sequence counter cannot advance without wrapping.
Implementations§
Source§impl<T> TrySendError<T>
impl<T> TrySendError<T>
Sourcepub fn map<U>(self, map: impl FnOnce(T) -> U) -> TrySendError<U>
pub fn map<U>(self, map: impl FnOnce(T) -> U) -> TrySendError<U>
Maps the rejected payload without changing the rejection reason.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the payload that was not accepted.
Trait Implementations§
Source§impl<T> Debug for TrySendError<T>
impl<T> Debug for TrySendError<T>
Source§impl<T> Display for TrySendError<T>
impl<T> Display for TrySendError<T>
Source§impl<T> Error for TrySendError<T>
Available on crate feature std only.
impl<T> Error for TrySendError<T>
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for TrySendError<T>where
T: Freeze,
impl<T> RefUnwindSafe for TrySendError<T>where
T: RefUnwindSafe,
impl<T> Send for TrySendError<T>where
T: Send,
impl<T> Sync for TrySendError<T>where
T: Sync,
impl<T> Unpin for TrySendError<T>where
T: Unpin,
impl<T> UnsafeUnpin for TrySendError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TrySendError<T>where
T: 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