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 private
Entry` 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 · 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
Auto Trait Implementations§
impl Freeze for ErasedSinkTrySendError
impl !RefUnwindSafe for ErasedSinkTrySendError
impl Send for ErasedSinkTrySendError
impl Sync for ErasedSinkTrySendError
impl Unpin for ErasedSinkTrySendError
impl !UnwindSafe for ErasedSinkTrySendError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Full
: 0 bytesDisconnected
: 0 bytesOther
: 16 bytes