Enum RoundingError
pub enum RoundingError
An error from rounding by TimeDelta
See: DurationRound
Variants
-
DurationExceedsTimestamp Error when the TimeDelta exceeds the TimeDelta from or until the Unix epoch.
Note: this error is not produced anymore.
-
DurationExceedsLimit Error when
TimeDelta.num_nanosecondsexceeds the limit.# use ; let dt = from_ymd_opt .unwrap .and_hms_nano_opt .unwrap .and_utc; assert_eq!;-
TimestampExceedsLimit Error when
DateTime.timestamp_nanosexceeds the limit.# use ; let dt = Utc.with_ymd_and_hms.unwrap; assert_eq!;
Trait Implementations
impl Clone for RoundingError
fn clone(&self) -> RoundingError
impl Copy for RoundingError
impl Debug for RoundingError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for RoundingError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for RoundingError
impl Error for RoundingError
fn description(&self) -> &str
impl PartialEq for RoundingError
fn eq(&self, other: &RoundingError) -> bool
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
impl<T> Any for RoundingError
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for RoundingError
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for RoundingError
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for RoundingError
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for RoundingError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for RoundingError
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for RoundingError
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for RoundingError
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for RoundingError
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for RoundingError
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>