pub(crate) struct TimeZoneRef<'a> {
transitions: &'a [Transition],
local_time_types: &'a [LocalTimeType],
leap_seconds: &'a [LeapSecond],
extra_rule: &'a Option<TransitionRule>,
}
Expand description
Reference to a time zone
Fields§
§transitions: &'a [Transition]
List of transitions
local_time_types: &'a [LocalTimeType]
List of local time types (cannot be empty)
leap_seconds: &'a [LeapSecond]
List of leap seconds
extra_rule: &'a Option<TransitionRule>
Extra transition rule applicable after the last transition
Implementations§
source§impl<'a> TimeZoneRef<'a>
impl<'a> TimeZoneRef<'a>
sourcepub(crate) fn find_local_time_type(
&self,
unix_time: i64,
) -> Result<&'a LocalTimeType, Error>
pub(crate) fn find_local_time_type( &self, unix_time: i64, ) -> Result<&'a LocalTimeType, Error>
Find the local time type associated to the time zone at the specified Unix time in seconds
pub(crate) fn find_local_time_type_from_local( &self, local_time: i64, year: i32, ) -> Result<MappedLocalTime<LocalTimeType>, Error>
sourceconst fn unix_time_to_unix_leap_time(
&self,
unix_time: i64,
) -> Result<i64, Error>
const fn unix_time_to_unix_leap_time( &self, unix_time: i64, ) -> Result<i64, Error>
Convert Unix time to Unix leap time, from the list of leap seconds in a time zone
sourcefn unix_leap_time_to_unix_time(&self, unix_leap_time: i64) -> Result<i64, Error>
fn unix_leap_time_to_unix_time(&self, unix_leap_time: i64) -> Result<i64, Error>
Convert Unix leap time to Unix time, from the list of leap seconds in a time zone
sourceconst UTC: TimeZoneRef<'static> = _
const UTC: TimeZoneRef<'static> = _
The UTC time zone
Trait Implementations§
source§impl<'a> Clone for TimeZoneRef<'a>
impl<'a> Clone for TimeZoneRef<'a>
source§fn clone(&self) -> TimeZoneRef<'a>
fn clone(&self) -> TimeZoneRef<'a>
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<'a> Debug for TimeZoneRef<'a>
impl<'a> Debug for TimeZoneRef<'a>
source§impl<'a> PartialEq for TimeZoneRef<'a>
impl<'a> PartialEq for TimeZoneRef<'a>
source§fn eq(&self, other: &TimeZoneRef<'a>) -> bool
fn eq(&self, other: &TimeZoneRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Copy for TimeZoneRef<'a>
impl<'a> Eq for TimeZoneRef<'a>
impl<'a> StructuralPartialEq for TimeZoneRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for TimeZoneRef<'a>
impl<'a> RefUnwindSafe for TimeZoneRef<'a>
impl<'a> Send for TimeZoneRef<'a>
impl<'a> Sync for TimeZoneRef<'a>
impl<'a> Unpin for TimeZoneRef<'a>
impl<'a> UnwindSafe for TimeZoneRef<'a>
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