pub struct OffsetInfo { /* private fields */ }Expand description
Information associated with an offset when doing a time zone transition lookup.
Callers should generally only need the offset. This exposes additional information such as the time zone abbreviation or whether a timestamp is in daylight saving time or not.
Implementations§
Source§impl OffsetInfo
impl OffsetInfo
Sourcepub fn offset(&self) -> Offset
pub fn offset(&self) -> Offset
Returns the offset corresponding to this time zone transition. All instants at and following this transition’s timestamp (and before the next transition’s timestamp) need to apply this offset from UTC to get the civil or “local” time in the corresponding time zone.
Sourcepub fn abbreviation(&self) -> &Abbreviation
pub fn abbreviation(&self) -> &Abbreviation
Returns the time zone abbreviation corresponding to this time zone transition.
Sourcepub fn into_abbreviation(self) -> Abbreviation
pub fn into_abbreviation(self) -> Abbreviation
Consumes this offset info and returns its abbreviation.
Trait Implementations§
Source§impl Clone for OffsetInfo
impl Clone for OffsetInfo
Source§fn clone(&self) -> OffsetInfo
fn clone(&self) -> OffsetInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OffsetInfo
impl Debug for OffsetInfo
impl Eq for OffsetInfo
Source§impl Hash for OffsetInfo
impl Hash for OffsetInfo
Source§impl PartialEq for OffsetInfo
impl PartialEq for OffsetInfo
impl StructuralPartialEq for OffsetInfo
Auto Trait Implementations§
impl Freeze for OffsetInfo
impl RefUnwindSafe for OffsetInfo
impl Send for OffsetInfo
impl Sync for OffsetInfo
impl Unpin for OffsetInfo
impl UnsafeUnpin for OffsetInfo
impl UnwindSafe for OffsetInfo
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