Struct tz::timezone::TimeZoneRef
source · [−]pub struct TimeZoneRef<'a> { /* private fields */ }
Expand description
Reference to a time zone
Implementations
sourceimpl<'a> TimeZoneRef<'a>
impl<'a> TimeZoneRef<'a>
sourcepub const fn new(
transitions: &'a [Transition],
local_time_types: &'a [LocalTimeType],
leap_seconds: &'a [LeapSecond],
extra_rule: &'a Option<TransitionRule>
) -> Result<Self, TimeZoneError>
pub const fn new(
transitions: &'a [Transition],
local_time_types: &'a [LocalTimeType],
leap_seconds: &'a [LeapSecond],
extra_rule: &'a Option<TransitionRule>
) -> Result<Self, TimeZoneError>
Construct a time zone reference
sourcepub const fn transitions(&self) -> &'a [Transition]
pub const fn transitions(&self) -> &'a [Transition]
Returns list of transitions
sourcepub const fn local_time_types(&self) -> &'a [LocalTimeType]
pub const fn local_time_types(&self) -> &'a [LocalTimeType]
Returns list of local time types
sourcepub const fn leap_seconds(&self) -> &'a [LeapSecond]
pub const fn leap_seconds(&self) -> &'a [LeapSecond]
Returns list of leap seconds
sourcepub const fn extra_rule(&self) -> &'a Option<TransitionRule>
pub const fn extra_rule(&self) -> &'a Option<TransitionRule>
Returns extra transition rule applicable after the last transition
sourcepub const fn find_local_time_type(
&self,
unix_time: i64
) -> Result<&'a LocalTimeType, FindLocalTimeTypeError>
pub const fn find_local_time_type(
&self,
unix_time: i64
) -> Result<&'a LocalTimeType, FindLocalTimeTypeError>
Find the local time type associated to the time zone at the specified Unix time in seconds
Trait Implementations
sourceimpl<'a> Clone for TimeZoneRef<'a>
impl<'a> Clone for TimeZoneRef<'a>
sourcefn clone(&self) -> TimeZoneRef<'a>
fn clone(&self) -> TimeZoneRef<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for TimeZoneRef<'a>
impl<'a> Debug for TimeZoneRef<'a>
sourceimpl<'a> PartialEq<TimeZoneRef<'a>> for TimeZoneRef<'a>
impl<'a> PartialEq<TimeZoneRef<'a>> for TimeZoneRef<'a>
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &TimeZoneRef<'a>) -> bool
fn ne(&self, other: &TimeZoneRef<'a>) -> bool
This method tests for !=
.
impl<'a> Copy for TimeZoneRef<'a>
impl<'a> Eq for TimeZoneRef<'a>
impl<'a> StructuralEq for TimeZoneRef<'a>
impl<'a> StructuralPartialEq for TimeZoneRef<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more