pub struct RataDie(/* private fields */);
Expand description
The Rata Die, or R.D.: number of days since January 1, 1 CE.
The primary definition of this type is in the calendrical_calculations
crate.
See: https://en.wikipedia.org/wiki/Rata_Die
Typically, one should obtain RataDies from other calendrical code, rather than constructing them from integers. The valid range for direct construction is deliberately not documented as it may change.
Implementations§
Source§impl RataDie
impl RataDie
Sourcepub const fn new(fixed_date: i64) -> RataDie
pub const fn new(fixed_date: i64) -> RataDie
Create a RataDie
Typically, one should obtain RataDie
s from other calendrical code, rather than
constructing them from integers. The valid range for direct construction is
deliberately not documented as it may change.
Sourcepub const fn to_i64_date(self) -> i64
pub const fn to_i64_date(self) -> i64
Convert this to an i64
value representing the RataDie
Trait Implementations§
Source§impl AddAssign<i64> for RataDie
impl AddAssign<i64> for RataDie
Source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
Performs the
+=
operation. Read moreSource§impl Ord for RataDie
impl Ord for RataDie
Source§impl PartialOrd for RataDie
impl PartialOrd for RataDie
Source§impl SubAssign<i64> for RataDie
impl SubAssign<i64> for RataDie
Source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
Performs the
-=
operation. Read moreimpl Copy for RataDie
impl Eq for RataDie
impl StructuralPartialEq for RataDie
Auto Trait Implementations§
impl Freeze for RataDie
impl RefUnwindSafe for RataDie
impl Send for RataDie
impl Sync for RataDie
impl Unpin for RataDie
impl UnwindSafe for RataDie
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more