pub enum RoundingError {
DurationExceedsTimestamp,
DurationExceedsLimit,
TimestampExceedsLimit,
}Expand description
Error returned by DurationRound when rounding or truncating fails.
Variants§
DurationExceedsTimestamp
Kept for API parity with chrono; chrono itself notes this variant is no longer produced by its own implementation.
DurationExceedsLimit
The rounding span, expressed in nanoseconds, does not fit in an
i64 (or is zero/negative).
TimestampExceedsLimit
The date/time’s nanosecond timestamp does not fit in an i64.
Trait Implementations§
Source§impl Clone for RoundingError
impl Clone for RoundingError
Source§fn clone(&self) -> RoundingError
fn clone(&self) -> RoundingError
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 moreimpl Copy for RoundingError
Source§impl Debug for RoundingError
impl Debug for RoundingError
Source§impl Display for RoundingError
impl Display for RoundingError
impl Eq for RoundingError
Source§impl Error for RoundingError
impl Error for RoundingError
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 Format for RoundingError
impl Format for RoundingError
Source§impl PartialEq for RoundingError
impl PartialEq for RoundingError
impl StructuralPartialEq for RoundingError
Auto Trait Implementations§
impl Freeze for RoundingError
impl RefUnwindSafe for RoundingError
impl Send for RoundingError
impl Sync for RoundingError
impl Unpin for RoundingError
impl UnsafeUnpin for RoundingError
impl UnwindSafe for RoundingError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> Error for T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.