pub struct Error<T>(/* private fields */);
Expand description
Error returned by Timeout
.
Implementations§
Source§impl<T> Error<T>
impl<T> Error<T>
Sourcepub fn inner(err: T) -> Error<T>
pub fn inner(err: T) -> Error<T>
Create a new Error
representing the inner value completing with Err
.
Sourcepub fn is_inner(&self) -> bool
pub fn is_inner(&self) -> bool
Returns true
if the error was caused by the inner value completing
with Err
.
Sourcepub fn into_inner(self) -> Option<T>
pub fn into_inner(self) -> Option<T>
Consumes self
, returning the inner future error.
Sourcepub fn elapsed() -> Error<T>
pub fn elapsed() -> Error<T>
Create a new Error
representing the inner value not completing before
the deadline is reached.
Sourcepub fn is_elapsed(&self) -> bool
pub fn is_elapsed(&self) -> bool
Returns true
if the error was caused by the inner value not completing
before the deadline is reached.
Sourcepub fn timer(err: Error) -> Error<T>
pub fn timer(err: Error) -> Error<T>
Creates a new Error
representing an error encountered by the timer
implementation
Sourcepub fn into_timer(self) -> Option<Error>
pub fn into_timer(self) -> Option<Error>
Consumes self
, returning the error raised by the timer implementation.
Trait Implementations§
Source§impl<T: Error> Error for Error<T>
impl<T: Error> Error for Error<T>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Auto Trait Implementations§
impl<T> Freeze for Error<T>where
T: Freeze,
impl<T> RefUnwindSafe for Error<T>where
T: RefUnwindSafe,
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> UnwindSafe for Error<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