Struct parse_zoneinfo::transitions::FixedTimespan
source · pub struct FixedTimespan {
pub utc_offset: i64,
pub dst_offset: i64,
pub name: String,
}
Expand description
An individual timespan with a fixed offset.
This mimics the FixedTimespan
struct in datetime::cal::zone
, except
instead of “total offset” and “is DST” fields, it has separate UTC and
DST fields. Also, the name is an owned String
here instead of a slice.
Fields§
§utc_offset: i64
The number of seconds offset from UTC during this timespan.
dst_offset: i64
The number of extra daylight-saving seconds during this timespan.
name: String
The abbreviation in use during this timespan.
Implementations§
source§impl FixedTimespan
impl FixedTimespan
sourcepub fn total_offset(&self) -> i64
pub fn total_offset(&self) -> i64
The total offset in effect during this timespan.
Trait Implementations§
source§impl Clone for FixedTimespan
impl Clone for FixedTimespan
source§fn clone(&self) -> FixedTimespan
fn clone(&self) -> FixedTimespan
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 FixedTimespan
impl Debug for FixedTimespan
source§impl PartialEq for FixedTimespan
impl PartialEq for FixedTimespan
source§fn eq(&self, other: &FixedTimespan) -> bool
fn eq(&self, other: &FixedTimespan) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FixedTimespan
Auto Trait Implementations§
impl Freeze for FixedTimespan
impl RefUnwindSafe for FixedTimespan
impl Send for FixedTimespan
impl Sync for FixedTimespan
impl Unpin for FixedTimespan
impl UnwindSafe for FixedTimespan
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