pub struct GYear { /* private fields */ }
Expand description
It encodes the value using a number of seconds from the Gregorian calendar era using a Decimal
,
when combined with the month-day-time 12-31T00:00:00, and an optional timezone offset in minutes.
Implementations§
Source§impl GYear
impl GYear
pub const MAX: GYear
pub const MIN: GYear
pub fn from_be_bytes(bytes: [u8; 18]) -> GYear
pub fn year(self) -> i64
pub fn timezone(self) -> Option<DayTimeDuration>
pub fn timezone_offset(self) -> Option<TimezoneOffset>
pub fn adjust( self, timezone_offset: Option<TimezoneOffset>, ) -> Result<GYear, ThinError>
pub fn to_be_bytes(self) -> [u8; 18]
Sourcepub fn is_identical_with(self, other: GYear) -> bool
pub fn is_identical_with(self, other: GYear) -> bool
Checks if the two values are identical.
Trait Implementations§
Source§impl PartialOrd for GYear
impl PartialOrd for GYear
Source§impl TryFrom<GYearMonth> for GYear
impl TryFrom<GYearMonth> for GYear
Source§type Error = DateTimeOverflowError
type Error = DateTimeOverflowError
The type returned in the event of a conversion error.
Source§fn try_from(
year_month: GYearMonth,
) -> Result<GYear, <GYear as TryFrom<GYearMonth>>::Error>
fn try_from( year_month: GYearMonth, ) -> Result<GYear, <GYear as TryFrom<GYearMonth>>::Error>
Performs the conversion.
impl Copy for GYear
impl Eq for GYear
impl StructuralPartialEq for GYear
Auto Trait Implementations§
impl Freeze for GYear
impl RefUnwindSafe for GYear
impl Send for GYear
impl Sync for GYear
impl Unpin for GYear
impl UnwindSafe for GYear
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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