Struct tokio_timer::throttle::ThrottleError
source · [−]pub struct ThrottleError<T>(_);
Expand description
Either the error of the underlying stream, or an error within tokio’s timing machinery.
Implementations
sourceimpl<T> ThrottleError<T>
impl<T> ThrottleError<T>
sourcepub fn from_stream_err(err: T) -> Self
pub fn from_stream_err(err: T) -> Self
Creates a new ThrottleError
from the given stream error.
sourcepub fn from_timer_err(err: Error) -> Self
pub fn from_timer_err(err: Error) -> Self
Creates a new ThrottleError
from the given tokio timer error.
sourcepub fn get_stream_error(&self) -> Option<&T>
pub fn get_stream_error(&self) -> Option<&T>
Attempts to get the underlying stream error, if it is present.
sourcepub fn get_timer_error(&self) -> Option<&Error>
pub fn get_timer_error(&self) -> Option<&Error>
Attempts to get the underlying timer error, if it is present.
sourcepub fn into_stream_error(self) -> Option<T>
pub fn into_stream_error(self) -> Option<T>
Attempts to extract the underlying stream error, if it is present.
sourcepub fn into_timer_error(self) -> Option<Error>
pub fn into_timer_error(self) -> Option<Error>
Attempts to extract the underlying timer error, if it is present.
sourcepub fn is_stream_error(&self) -> bool
pub fn is_stream_error(&self) -> bool
Returns whether the throttle error has occured because of an error in the underlying stream.
sourcepub fn is_timer_error(&self) -> bool
pub fn is_timer_error(&self) -> bool
Returns whether the throttle error has occured because of an error in tokio’s timer system.
Trait Implementations
sourceimpl<T: Debug> Debug for ThrottleError<T>
impl<T: Debug> Debug for ThrottleError<T>
sourceimpl<T: StdError> Display for ThrottleError<T>
impl<T: StdError> Display for ThrottleError<T>
sourceimpl<T: StdError + 'static> Error for ThrottleError<T>
impl<T: StdError + 'static> Error for ThrottleError<T>
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
replaced by Error::source, which can support downcasting
Auto Trait Implementations
impl<T> RefUnwindSafe for ThrottleError<T> where
T: RefUnwindSafe,
impl<T> Send for ThrottleError<T> where
T: Send,
impl<T> Sync for ThrottleError<T> where
T: Sync,
impl<T> Unpin for ThrottleError<T> where
T: Unpin,
impl<T> UnwindSafe for ThrottleError<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more