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 · 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()