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>

source

pub(crate) fn new(data: Option<&'b IslamicCacheV1<'b>>) -> Self

source

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>

source§

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>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T