Struct icu_calendar::islamic::IslamicPrecomputedData
source · pub(crate) struct IslamicPrecomputedData<'a, IB: IslamicBasedMarker> {
data: Option<&'a IslamicCacheV1<'a>>,
_ib: PhantomData<IB>,
}
Expand description
Contains any loaded precomputed data. If constructed with Default, will not contain any extra data and will always compute stuff from scratch
Fields§
§data: Option<&'a IslamicCacheV1<'a>>
§_ib: PhantomData<IB>
Implementations§
source§impl<'b, IB: IslamicBasedMarker> IslamicPrecomputedData<'b, IB>
impl<'b, IB: IslamicBasedMarker> IslamicPrecomputedData<'b, IB>
pub(crate) fn new(data: Option<&'b IslamicCacheV1<'b>>) -> Self
sourcefn load_or_compute_info_for_iso(
&self,
fixed: RataDie,
) -> (IslamicYearInfo, i32, u8, u8)
fn load_or_compute_info_for_iso( &self, fixed: RataDie, ) -> (IslamicYearInfo, i32, u8, u8)
Given an ISO date (in both ArithmeticDate and R.D. format), returns the IslamicYearInfo and extended year for that date, loading from cache or computing.
Trait Implementations§
source§impl<'a, IB: Default + IslamicBasedMarker> Default for IslamicPrecomputedData<'a, IB>
impl<'a, IB: Default + IslamicBasedMarker> Default for IslamicPrecomputedData<'a, IB>
source§fn default() -> IslamicPrecomputedData<'a, IB>
fn default() -> IslamicPrecomputedData<'a, IB>
Returns the “default value” for a type. Read more
source§impl<'b, IB: IslamicBasedMarker> PrecomputedDataSource<IslamicYearInfo> for IslamicPrecomputedData<'b, IB>
impl<'b, IB: IslamicBasedMarker> PrecomputedDataSource<IslamicYearInfo> for IslamicPrecomputedData<'b, IB>
source§fn load_or_compute_info(&self, extended_year: i32) -> IslamicYearInfo
fn load_or_compute_info(&self, extended_year: i32) -> IslamicYearInfo
Given a calendar year, load (or compute) the YearInfo for it Read more
Auto Trait Implementations§
impl<'a, IB> Freeze for IslamicPrecomputedData<'a, IB>
impl<'a, IB> RefUnwindSafe for IslamicPrecomputedData<'a, IB>where
IB: RefUnwindSafe,
impl<'a, IB> Send for IslamicPrecomputedData<'a, IB>where
IB: Send,
impl<'a, IB> Sync for IslamicPrecomputedData<'a, IB>where
IB: Sync,
impl<'a, IB> Unpin for IslamicPrecomputedData<'a, IB>where
IB: Unpin,
impl<'a, IB> UnwindSafe for IslamicPrecomputedData<'a, IB>where
IB: UnwindSafe,
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