pub struct HijriCache<'data> {
pub first_extended_year: i32,
pub data: ZeroVec<'data, PackedHijriYearInfo>,
}
Expand description
Cached/precompiled data for a certain range of years for a chinese-based calendar. Avoids the need to perform lunar calendar arithmetic for most calendrical operations.
Fields§
§first_extended_year: i32
The extended year corresponding to the first data entry for this year
data: ZeroVec<'data, PackedHijriYearInfo>
A list of precomputed data for each year beginning with first_extended_year
Implementations§
Source§impl HijriCache<'_>
impl HijriCache<'_>
Sourcepub fn compute_for<IB>(extended_years: Range<i32>) -> HijriCache<'_>where
IB: IslamicBasedMarker,
pub fn compute_for<IB>(extended_years: Range<i32>) -> HijriCache<'_>where
IB: IslamicBasedMarker,
Compute this data for a range of years
Trait Implementations§
Source§impl<'data> Bake for HijriCache<'data>
impl<'data> Bake for HijriCache<'data>
Source§fn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Source§impl<'data> BakeSize for HijriCache<'data>
impl<'data> BakeSize for HijriCache<'data>
Source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
Source§impl<'data> Clone for HijriCache<'data>
impl<'data> Clone for HijriCache<'data>
Source§fn clone(&self) -> HijriCache<'data>
fn clone(&self) -> HijriCache<'data>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'data> Debug for HijriCache<'data>
impl<'data> Debug for HijriCache<'data>
Source§impl<'data> Default for HijriCache<'data>
impl<'data> Default for HijriCache<'data>
Source§fn default() -> HijriCache<'data>
fn default() -> HijriCache<'data>
Returns the “default value” for a type. Read more
Source§impl<'de, 'data> Deserialize<'de> for HijriCache<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for HijriCache<'data>where
'de: 'data,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HijriCache<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HijriCache<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MaybeAsVarULE for HijriCache<'_>
impl MaybeAsVarULE for HijriCache<'_>
Source§impl MaybeEncodeAsVarULE for HijriCache<'_>
impl MaybeEncodeAsVarULE for HijriCache<'_>
Source§fn maybe_encode_as_varule(
&self,
) -> Option<&<HijriCache<'_> as MaybeAsVarULE>::EncodedStruct>
fn maybe_encode_as_varule( &self, ) -> Option<&<HijriCache<'_> as MaybeAsVarULE>::EncodedStruct>
Returns the
MaybeAsVarULE::EncodedStruct
that represents this data struct,
or None
if the data struct does not support this representation.Source§impl<'data> PartialEq for HijriCache<'data>
impl<'data> PartialEq for HijriCache<'data>
Source§impl<'data> Serialize for HijriCache<'data>
impl<'data> Serialize for HijriCache<'data>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'a> Yokeable<'a> for HijriCache<'static>
impl<'a> Yokeable<'a> for HijriCache<'static>
Source§type Output = HijriCache<'a>
type Output = HijriCache<'a>
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
Source§fn transform_owned(self) -> <HijriCache<'static> as Yokeable<'a>>::Output
fn transform_owned(self) -> <HijriCache<'static> as Yokeable<'a>>::Output
Source§unsafe fn make(
this: <HijriCache<'static> as Yokeable<'a>>::Output,
) -> HijriCache<'static>
unsafe fn make( this: <HijriCache<'static> as Yokeable<'a>>::Output, ) -> HijriCache<'static>
This method can be used to cast away
Self<'a>
’s lifetime. Read moreSource§fn transform_mut<F>(&'a mut self, f: F)
fn transform_mut<F>(&'a mut self, f: F)
This method must cast
self
between &'a mut Self<'static>
and &'a mut Self<'a>
,
and pass it to f
. Read moreSource§impl<'zf, 'zf_inner> ZeroFrom<'zf, HijriCache<'zf_inner>> for HijriCache<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, HijriCache<'zf_inner>> for HijriCache<'zf>
Source§fn zero_from(this: &'zf HijriCache<'zf_inner>) -> HijriCache<'zf>
fn zero_from(this: &'zf HijriCache<'zf_inner>) -> HijriCache<'zf>
Clone the other
C
into a struct that may retain references into C
.impl<'data> StructuralPartialEq for HijriCache<'data>
Auto Trait Implementations§
impl<'data> Freeze for HijriCache<'data>
impl<'data> RefUnwindSafe for HijriCache<'data>
impl<'data> Send for HijriCache<'data>
impl<'data> Sync for HijriCache<'data>
impl<'data> Unpin for HijriCache<'data>
impl<'data> UnwindSafe for HijriCache<'data>
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