#[non_exhaustive]pub enum TimestampError {
InvalidFormat,
OutOfRange,
}Expand description
Error type for parsing or formatting JSON timestamps.
This enum represents errors that can occur when parsing timestamp strings or validating timestamp values.
Marked #[non_exhaustive] so additional variants can be introduced in a
future release without a semver break; downstream match expressions
must include a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidFormat
The input string had an invalid format.
OutOfRange
The timestamp value is out of the supported range
(year 1 through year 9999, with nanos < 1_000_000_000).
Trait Implementations§
Source§impl Clone for TimestampError
impl Clone for TimestampError
Source§fn clone(&self) -> TimestampError
fn clone(&self) -> TimestampError
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 TimestampError
impl Debug for TimestampError
Source§impl Display for TimestampError
impl Display for TimestampError
Source§impl Error for TimestampError
impl Error for TimestampError
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 TimestampError
impl PartialEq for TimestampError
Source§fn eq(&self, other: &TimestampError) -> bool
fn eq(&self, other: &TimestampError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TimestampError
impl Eq for TimestampError
impl StructuralPartialEq for TimestampError
Auto Trait Implementations§
impl Freeze for TimestampError
impl RefUnwindSafe for TimestampError
impl Send for TimestampError
impl Sync for TimestampError
impl Unpin for TimestampError
impl UnsafeUnpin for TimestampError
impl UnwindSafe for TimestampError
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