pub enum DurationError {
OutOfRange(),
MismatchedSigns(),
Serializate(),
Deserialize(String),
}Expand description
Represent failures in converting or creating Duration instances.
Variants§
OutOfRange()
One of the components (seconds and/or nanoseconds) was out of range.
MismatchedSigns()
The sign of the seconds component does not match the sign of the nanoseconds component.
Serializate()
Cannot serialize the duration.
Deserialize(String)
Cannot deserialize the duration.
Trait Implementations§
Source§impl Debug for DurationError
impl Debug for DurationError
Source§impl Display for DurationError
impl Display for DurationError
Source§impl Error for DurationError
impl Error for DurationError
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 PartialEq for DurationError
impl PartialEq for DurationError
impl StructuralPartialEq for DurationError
Auto Trait Implementations§
impl Freeze for DurationError
impl RefUnwindSafe for DurationError
impl Send for DurationError
impl Sync for DurationError
impl Unpin for DurationError
impl UnwindSafe for DurationError
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