pub(super) enum TransitionRule {
Fixed(LocalTimeType),
Alternate(AlternateTime),
}
Expand description
Transition rule
Variants§
Implementations§
source§impl TransitionRule
impl TransitionRule
sourcepub(super) fn from_tz_string(
tz_string: &[u8],
use_string_extensions: bool,
) -> Result<Self, Error>
pub(super) fn from_tz_string( tz_string: &[u8], use_string_extensions: bool, ) -> Result<Self, Error>
Parse a POSIX TZ string containing a time zone description, as described in the POSIX documentation of the TZ
environment variable.
TZ string extensions from RFC 8536 may be used.
sourcepub(super) fn find_local_time_type(
&self,
unix_time: i64,
) -> Result<&LocalTimeType, Error>
pub(super) fn find_local_time_type( &self, unix_time: i64, ) -> Result<&LocalTimeType, Error>
Find the local time type associated to the transition rule at the specified Unix time in seconds
sourcepub(super) fn find_local_time_type_from_local(
&self,
local_time: i64,
year: i32,
) -> Result<MappedLocalTime<LocalTimeType>, Error>
pub(super) fn find_local_time_type_from_local( &self, local_time: i64, year: i32, ) -> Result<MappedLocalTime<LocalTimeType>, Error>
Find the local time type associated to the transition rule at the specified Unix time in seconds
Trait Implementations§
source§impl Clone for TransitionRule
impl Clone for TransitionRule
source§fn clone(&self) -> TransitionRule
fn clone(&self) -> TransitionRule
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 Debug for TransitionRule
impl Debug for TransitionRule
source§impl From<AlternateTime> for TransitionRule
impl From<AlternateTime> for TransitionRule
source§fn from(inner: AlternateTime) -> Self
fn from(inner: AlternateTime) -> Self
Converts to this type from the input type.
source§impl From<LocalTimeType> for TransitionRule
impl From<LocalTimeType> for TransitionRule
source§fn from(inner: LocalTimeType) -> Self
fn from(inner: LocalTimeType) -> Self
Converts to this type from the input type.
source§impl PartialEq for TransitionRule
impl PartialEq for TransitionRule
source§fn eq(&self, other: &TransitionRule) -> bool
fn eq(&self, other: &TransitionRule) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransitionRule
impl Eq for TransitionRule
impl StructuralPartialEq for TransitionRule
Auto Trait Implementations§
impl Freeze for TransitionRule
impl RefUnwindSafe for TransitionRule
impl Send for TransitionRule
impl Sync for TransitionRule
impl Unpin for TransitionRule
impl UnwindSafe for TransitionRule
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