pub enum ErasedSinkTrySendError {
Full,
Disconnected,
Other(Arc<dyn Error + Send + Sync + 'static>),
}Expand description
Type-erased error for SinkTrySend::try_send
Provided for situations where providing a concrete error type is awkward.
futures::channel::mpsc::Sender wants this because when its try_send method fails,
it is not possible to extract both the sent item, and the error!
tor_memquota::mq_queue::Sender wants this because the types of the error return
from its try_sendwould otherwise be tainted by complex generics, including its privateEntry` type.
Variants§
Full
The stream was full.
No arrangements will have been made for a wakeup when space becomes available.
Corresponds to SinkTrySendError::is_full
Disconnected
The stream has disconnected
Corresponds to SinkTrySendError::is_disconnected
Other(Arc<dyn Error + Send + Sync + 'static>)
Something else went wrong
Implementations§
Source§impl ErasedSinkTrySendError
impl ErasedSinkTrySendError
Sourcepub fn from<E>(e: E) -> ErasedSinkTrySendError
pub fn from<E>(e: E) -> ErasedSinkTrySendError
Obtain an ErasedSinkTrySendError from a concrete SinkTrySendError
Trait Implementations§
Source§impl Clone for ErasedSinkTrySendError
impl Clone for ErasedSinkTrySendError
Source§fn clone(&self) -> ErasedSinkTrySendError
fn clone(&self) -> ErasedSinkTrySendError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErasedSinkTrySendError
impl Debug for ErasedSinkTrySendError
Source§impl Display for ErasedSinkTrySendError
impl Display for ErasedSinkTrySendError
Source§impl Error for ErasedSinkTrySendError
impl Error for ErasedSinkTrySendError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ErasedSinkTrySendError
impl !UnwindSafe for ErasedSinkTrySendError
impl Freeze for ErasedSinkTrySendError
impl Send for ErasedSinkTrySendError
impl Sync for ErasedSinkTrySendError
impl Unpin for ErasedSinkTrySendError
impl UnsafeUnpin for ErasedSinkTrySendError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> ErrorReport for Ewhere
E: Error + 'static,
impl<E> ErrorReport for Ewhere
E: Error + 'static,
Source§fn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more