pub enum ParseDurationError {
Invalid {
input: String,
reason: String,
},
Negative,
Overflow,
}Expand description
Error returned when a duration string can’t be parsed.
Variants§
Invalid
The value was syntactically invalid.
Negative
The value parsed to a negative duration, which std::time::Duration can’t represent.
Overflow
The value exceeds the range of std::time::Duration as nanoseconds.
Trait Implementations§
Source§impl Clone for ParseDurationError
impl Clone for ParseDurationError
Source§fn clone(&self) -> ParseDurationError
fn clone(&self) -> ParseDurationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParseDurationError
impl Debug for ParseDurationError
Source§impl Display for ParseDurationError
impl Display for ParseDurationError
impl Eq for ParseDurationError
Source§impl Error for ParseDurationError
impl Error for ParseDurationError
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 ParseDurationError
impl PartialEq for ParseDurationError
Source§fn eq(&self, other: &ParseDurationError) -> bool
fn eq(&self, other: &ParseDurationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParseDurationError
Auto Trait Implementations§
impl Freeze for ParseDurationError
impl RefUnwindSafe for ParseDurationError
impl Send for ParseDurationError
impl Sync for ParseDurationError
impl Unpin for ParseDurationError
impl UnsafeUnpin for ParseDurationError
impl UnwindSafe for ParseDurationError
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