pub enum TrySendError<T> {
Closed(T),
Full(T),
}Expand description
Returned by the sync Transport::try_send /
Transport::try_send_requests when
immediate delivery fails.
The undelivered value T is always returned inside the variant so the caller can
recover it without cloning.
§Variants and recovery
-
Full— the channel is currently at capacity. The message has not been dropped; the caller can retry later with anothertry_sendcall, switch to the backpressure-awaresend, or discard the message if it is stale. -
Closed— all channel receivers have been dropped. TheSiftStreamis shutting down. Retrying on the same stream will not succeed.
Variants§
Closed(T)
The channel has been closed. The undelivered value is returned.
Full(T)
The channel is currently full. The undelivered value is returned.
Implementations§
Trait Implementations§
Source§impl<T: Debug> Debug for TrySendError<T>
impl<T: Debug> Debug for TrySendError<T>
Source§impl<T> Display for TrySendError<T>
impl<T> Display for TrySendError<T>
Source§impl<T: Debug> Error for TrySendError<T>
impl<T: Debug> Error for TrySendError<T>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> RetryExt for T
impl<T> RetryExt for T
Source§fn retrying(self, cfg: RetryConfig) -> Retrying<Self>
fn retrying(self, cfg: RetryConfig) -> Retrying<Self>
Wraps
self in a Retrying adapter with the given configuration.