pub enum ParseError<'a> {
Nom(ErrorKind),
UnknownName(&'a str),
Range(RangeError),
ComponentRange(ComponentRange),
}Available on crate feature
posix-tz only.Expand description
The main type of error that is returned when a TZ POSIX string fails to parse.
Variants§
Nom(ErrorKind)
A nom parsing error.
UnknownName(&'a str)
In case a short format was given, the POSIX standard doesn’t define what to do, in this implementation we just try to match the first tzdb timezone containing the short name; if none could be found this error variant is returned.
Range(RangeError)
We’ve exceeded the range of a field when checking for conformance against the POSIX standard.
ComponentRange(ComponentRange)
We’ve exceeded the range of a date component when converting types to time-rs.
Trait Implementations§
Source§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
Source§impl<'a> Display for ParseError<'a>
impl<'a> Display for ParseError<'a>
Source§impl<'a> Error for ParseError<'a>
impl<'a> Error for ParseError<'a>
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()
Auto Trait Implementations§
impl<'a> Freeze for ParseError<'a>
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> Send for ParseError<'a>
impl<'a> Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'a>
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