#[non_exhaustive]pub enum TimestampError {
InvalidLength {
expected: usize,
actual: usize,
},
InvalidFormat,
InvalidValue,
OutOfRange,
SubmicrosecondPrecision,
SystemTimeOutOfRange,
}Expand description
Validation or conversion failure for a Timestamp.
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.
InvalidLength
The encoded timestamp did not have the canonical byte length.
Fields
InvalidFormat
The timestamp did not use the canonical separators and UTC suffix.
InvalidValue
A calendar or clock component was invalid.
OutOfRange
The instant was outside the supported four-digit year range.
SubmicrosecondPrecision
Conversion would silently discard sub-microsecond precision.
SystemTimeOutOfRange
The platform’s SystemTime range could not represent the instant.
Trait Implementations§
Source§impl Clone for TimestampError
impl Clone for TimestampError
Source§impl Debug for TimestampError
impl Debug for TimestampError
Source§impl Display for TimestampError
impl Display for TimestampError
impl Eq 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
impl StructuralPartialEq for TimestampError
Auto Trait Implementations§
impl Forget for TimestampError
impl Freeze for TimestampError
impl Move 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