pub struct TimeZoneInfo { /* private fields */ }
Implementations§
Source§impl TimeZoneInfo
impl TimeZoneInfo
Sourcepub fn utc() -> Box<TimeZoneInfo>
pub fn utc() -> Box<TimeZoneInfo>
Creates a time zone for UTC (Coordinated Universal Time).
Sourcepub fn from_parts(
time_zone_id: &TimeZone,
offset: Option<&UtcOffset>,
zone_variant: Option<TimeZoneVariant>,
) -> Box<TimeZoneInfo>
pub fn from_parts( time_zone_id: &TimeZone, offset: Option<&UtcOffset>, zone_variant: Option<TimeZoneVariant>, ) -> Box<TimeZoneInfo>
Creates a time zone info from parts.
pub fn time_zone_id(&self) -> Box<TimeZone>
pub fn at_time(&self, date: &IsoDate, time: &Time) -> Box<Self>
pub fn local_time(&self) -> Option<IsoDateTime>
pub fn with_zone_variant(&self, time_zone_variant: TimeZoneVariant) -> Box<Self>
Sourcepub fn infer_zone_variant(
&mut self,
offset_calculator: &VariantOffsetsCalculator,
) -> Option<()>
pub fn infer_zone_variant( &mut self, offset_calculator: &VariantOffsetsCalculator, ) -> Option<()>
Infers the zone variant.
Requires the offset and local time to be set.
pub fn zone_variant(&self) -> Option<TimeZoneVariant>
Trait Implementations§
Source§impl From<TimeZoneInfo<AtTime>> for TimeZoneInfo
impl From<TimeZoneInfo<AtTime>> for TimeZoneInfo
Source§fn from(other: TimeZoneInfo<AtTime>) -> Self
fn from(other: TimeZoneInfo<AtTime>) -> Self
Converts to this type from the input type.
Source§impl From<TimeZoneInfo<Base>> for TimeZoneInfo
impl From<TimeZoneInfo<Base>> for TimeZoneInfo
Source§fn from(other: TimeZoneInfo<Base>) -> Self
fn from(other: TimeZoneInfo<Base>) -> Self
Converts to this type from the input type.
Source§impl From<TimeZoneInfo<Full>> for TimeZoneInfo
impl From<TimeZoneInfo<Full>> for TimeZoneInfo
Source§fn from(other: TimeZoneInfo<Full>) -> Self
fn from(other: TimeZoneInfo<Full>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TimeZoneInfo
impl RefUnwindSafe for TimeZoneInfo
impl Send for TimeZoneInfo
impl Sync for TimeZoneInfo
impl Unpin for TimeZoneInfo
impl UnwindSafe for TimeZoneInfo
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