pub struct Zone { /* private fields */ }Expand description
A parsed IANA timezone, exposing transitions, zone types, leap seconds, and the POSIX TZ extend rule.
Instances come from load and reference &'static data
generated at build time; Zone is Copy.
Implementations§
Source§impl Zone
impl Zone
Sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
The TZif format version the data was compiled from (1, 2, 3, or 4).
Sourcepub fn transitions(&self) -> &'static [Transition]
pub fn transitions(&self) -> &'static [Transition]
The stored transition records.
Sourcepub fn leap_seconds(&self) -> &'static [LeapSecond]
pub fn leap_seconds(&self) -> &'static [LeapSecond]
The leap-second records.
Sourcepub fn extend(&self) -> Option<&PosixTz<'static>>
pub fn extend(&self) -> Option<&PosixTz<'static>>
The parsed POSIX TZ rule for computing future transitions, if any.
Sourcepub fn extend_raw(&self) -> &'static str
pub fn extend_raw(&self) -> &'static str
The raw POSIX TZ footer string (empty if none).
Sourcepub fn type_count(&self) -> usize
pub fn type_count(&self) -> usize
The number of local time types.
Sourcepub fn type_at(&self, i: usize) -> ZoneType
pub fn type_at(&self, i: usize) -> ZoneType
Returns the i-th local time type. Panics if i >= types().len().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Zone
impl RefUnwindSafe for Zone
impl Send for Zone
impl Sync for Zone
impl Unpin for Zone
impl UnsafeUnpin for Zone
impl UnwindSafe for Zone
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