Struct MaybeNamedTimeZone

pub struct MaybeNamedTimeZone { pub name: Option<TimeZoneId>, pub tz: TimeZone }

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:

Fields

name: Option<TimeZoneId>

The name of this TZif time zone. e.g., America/New_York.

tz: TimeZone

The time zone itself.

Implementations

impl MaybeNamedTimeZone

fn name(&self) -> Option<&str>

Returns the underlying time zone name as a string.

fn tz(&self) -> &TimeZone

Returns a reference to the underlying time zone definition.

Trait Implementations

impl Clone for MaybeNamedTimeZone

fn clone(&self) -> Self

impl Debug for MaybeNamedTimeZone

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PartialEq for MaybeNamedTimeZone

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for MaybeNamedTimeZone

Auto Trait Implementations

impl Freeze 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

impl<T> Any for MaybeNamedTimeZone where T: 'static + ?Sized,

impl<T> Borrow<T> for MaybeNamedTimeZone where T: ?Sized,

impl<T> BorrowMut<T> for MaybeNamedTimeZone where T: ?Sized,

impl<T> CloneToUninit for MaybeNamedTimeZone where T: Clone,

impl<T> From<T> for MaybeNamedTimeZone

impl<T> ToOwned for MaybeNamedTimeZone where T: Clone,

impl<T, U> Into<U> for MaybeNamedTimeZone where U: From<T>,

impl<T, U> TryFrom<U> for MaybeNamedTimeZone where U: Into<T>,

impl<T, U> TryInto<U> for MaybeNamedTimeZone where U: TryFrom<T>,