pub enum TimespanParseError {
Empty,
InvalidNumber,
MissingNumber,
InvalidUnit(String),
InvalidCharacter(char),
}Expand description
Error type for timespan parsing
Variants§
Empty
The input string is empty
InvalidNumber
Invalid number format
MissingNumber
Number without a unit
InvalidUnit(String)
Unknown time unit
InvalidCharacter(char)
Invalid character in input
Trait Implementations§
Source§impl Clone for TimespanParseError
impl Clone for TimespanParseError
Source§fn clone(&self) -> TimespanParseError
fn clone(&self) -> TimespanParseError
Returns a duplicate of the value. Read more
1.0.0 · 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 TimespanParseError
impl Debug for TimespanParseError
Source§impl Display for TimespanParseError
impl Display for TimespanParseError
Source§impl Error for TimespanParseError
impl Error for TimespanParseError
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 TimespanParseError
impl PartialEq for TimespanParseError
impl Eq for TimespanParseError
impl StructuralPartialEq for TimespanParseError
Auto Trait Implementations§
impl Freeze for TimespanParseError
impl RefUnwindSafe for TimespanParseError
impl Send for TimespanParseError
impl Sync for TimespanParseError
impl Unpin for TimespanParseError
impl UnsafeUnpin for TimespanParseError
impl UnwindSafe for TimespanParseError
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