pub struct DurationTooLong(/* private fields */);Expand description
A core::time::Duration too long for a Duration: more than
u64::MAX nanoseconds, about 584 years. What
Duration::try_from(core::time::Duration) returns for one;
Duration::saturating_from_core clamps it instead.
Only the conversion builds one, as with the standard library’s
TryFromIntError, so the type can carry more detail later.
Trait Implementations§
Source§impl Clone for DurationTooLong
impl Clone for DurationTooLong
impl Copy for DurationTooLong
Source§impl Debug for DurationTooLong
impl Debug for DurationTooLong
Source§impl Display for DurationTooLong
impl Display for DurationTooLong
impl Eq for DurationTooLong
Source§impl Error for DurationTooLong
impl Error for DurationTooLong
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()
Source§impl Hash for DurationTooLong
impl Hash for DurationTooLong
Source§impl PartialEq for DurationTooLong
impl PartialEq for DurationTooLong
impl StructuralPartialEq for DurationTooLong
Auto Trait Implementations§
impl Freeze for DurationTooLong
impl RefUnwindSafe for DurationTooLong
impl Send for DurationTooLong
impl Sync for DurationTooLong
impl Unpin for DurationTooLong
impl UnsafeUnpin for DurationTooLong
impl UnwindSafe for DurationTooLong
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