pub struct MaybeNamedTimeZone {
pub name: Option<TimeZoneId>,
pub tz: TimeZone,
}Expand description
A representation of a possibly named time zone backed by TZif data.
It is useful to represent a named time zone as distinct from the time zone itself because a name is not inherently part of the TZif data. Indeed, there are a couple reasons why it’s important to separate the name:
- It’s possible that no meaningful name exists. For example, a
/etc/localtimefile with no obvious mapping to a name. (e.g., No symlink and no discoverable Time Zone Database.) - Some IANA time zone identifiers correspond to different regions, but share the same TZif data.
Fields§
§name: Option<TimeZoneId>The name of this TZif time zone. e.g., America/New_York.
tz: TimeZoneThe time zone itself.
Implementations§
Trait Implementations§
Source§impl Clone for MaybeNamedTimeZone
impl Clone for MaybeNamedTimeZone
Source§impl Debug for MaybeNamedTimeZone
impl Debug for MaybeNamedTimeZone
Source§impl PartialEq for MaybeNamedTimeZone
impl PartialEq for MaybeNamedTimeZone
impl StructuralPartialEq for MaybeNamedTimeZone
Auto Trait Implementations§
impl Forget for MaybeNamedTimeZone
impl Freeze for MaybeNamedTimeZone
impl Move for MaybeNamedTimeZone
impl RefUnwindSafe for MaybeNamedTimeZone
impl Send for MaybeNamedTimeZone
impl Sync for MaybeNamedTimeZone
impl Unpin for MaybeNamedTimeZone
impl UnsafeUnpin for MaybeNamedTimeZone
impl UnwindSafe for MaybeNamedTimeZone
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