pub struct VariantOffsetsCalculator { /* private fields */ }๐Deprecated since 2.1.0: this API is a bad approximation of a time zone database
Expand description
VariantOffsetsCalculator uses data from the data provider to calculate time zone offsets.
Implementationsยง
Sourceยงimpl VariantOffsetsCalculator
impl VariantOffsetsCalculator
Sourcepub const fn new() -> VariantOffsetsCalculatorBorrowed<'static>
pub const fn new() -> VariantOffsetsCalculatorBorrowed<'static>
Constructs a VariantOffsetsCalculator using compiled data.
โจ Enabled with the compiled_data Cargo feature.
Sourcepub fn try_new_with_buffer_provider(
provider: &(impl BufferProvider + ?Sized),
) -> Result<VariantOffsetsCalculator, DataError>
pub fn try_new_with_buffer_provider( provider: &(impl BufferProvider + ?Sized), ) -> Result<VariantOffsetsCalculator, DataError>
A version of Self::new that uses custom data provided by a BufferProvider.
โจ Enabled with the serde feature.
Sourcepub fn try_new_unstable(
provider: &(impl DataProvider<TimezonePeriodsV1> + ?Sized),
) -> Result<VariantOffsetsCalculator, DataError>
pub fn try_new_unstable( provider: &(impl DataProvider<TimezonePeriodsV1> + ?Sized), ) -> Result<VariantOffsetsCalculator, DataError>
A version of Self::new that uses custom data provided by a DataProvider.
๐ Help choosing a constructor
โ ๏ธ The bounds on provider may change over time, including in SemVer minor releases.
Sourcepub fn as_borrowed(&self) -> VariantOffsetsCalculatorBorrowed<'_>
pub fn as_borrowed(&self) -> VariantOffsetsCalculatorBorrowed<'_>
Returns a borrowed version of the calculator that can be queried.
This avoids a small potential indirection cost when querying.
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for VariantOffsetsCalculator
impl RefUnwindSafe for VariantOffsetsCalculator
impl !Send for VariantOffsetsCalculator
impl !Sync for VariantOffsetsCalculator
impl Unpin for VariantOffsetsCalculator
impl UnwindSafe for VariantOffsetsCalculator
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> 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