pub struct Elapsed(/* private fields */);Expand description
The timeout’s error — “the deadline elapsed before the future completed”.
The seam’s own type on both backends, where the hosted half used to
re-export tokio::time::error::Elapsed. It has to be: timeout returns
this error without arming a timer when the budget is already spent, and
tokio’s Elapsed has no public constructor (pub(crate) fn new), so an
alias makes the expired branch unwritable. No call site in this workspace
names the type — every one of the 81 discards or maps it — so the change is
invisible above the seam.
Trait Implementations§
impl Copy for Elapsed
impl Eq for Elapsed
Source§impl Error for Elapsed
impl Error for Elapsed
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
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Elapsed
Auto Trait Implementations§
impl Freeze for Elapsed
impl RefUnwindSafe for Elapsed
impl Send for Elapsed
impl Sync for Elapsed
impl Unpin for Elapsed
impl UnsafeUnpin for Elapsed
impl UnwindSafe for Elapsed
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