Enum TimeZoneAnnotationKind

#[non_exhaustive]
pub enum TimeZoneAnnotationKind<'n>

The kind of time zone found in an RFC 9557 timestamp, for use with Pieces.

The lifetime parameter refers to the lifetime of the time zone name. The lifetime is static when the time zone annotation is offset or if the name is owned. An owned value can be produced via TimeZoneAnnotation::into_owned when the alloc crate feature is enabled.

Variants

Named(TimeZoneAnnotationName<'n>)

The time zone annotation is a name, usually an IANA time zone identifier. For example, America/New_York.

Offset(Offset)

The time zone annotation is an offset. For example, -05:00.

Implementations

impl<'n> TimeZoneAnnotationKind<'n>

fn into_owned(self) -> TimeZoneAnnotationKind<'static>

Converts this time zone annotation kind into an "owned" value whose lifetime is 'static.

If this was already an "owned" value or a time zone annotation offset, then this is a no-op.

Trait Implementations

impl From<Offset> for TimeZoneAnnotationKind<'static>

fn from(offset: Offset) -> TimeZoneAnnotationKind<'static>

impl<'n> Clone for TimeZoneAnnotationKind<'n>

fn clone(&self) -> Self

impl<'n> Debug for TimeZoneAnnotationKind<'n>

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

impl<'n> Eq for TimeZoneAnnotationKind<'n>

impl<'n> From<&'n str> for TimeZoneAnnotationKind<'n>

fn from(string: &'n str) -> TimeZoneAnnotationKind<'n>

impl<'n> Hash for TimeZoneAnnotationKind<'n>

fn hash<__H: Hasher>(&self, state: &mut __H)

impl<'n> PartialEq for TimeZoneAnnotationKind<'n>

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

impl<'n> StructuralPartialEq for TimeZoneAnnotationKind<'n>

Auto Trait Implementations

impl<'n> Freeze for TimeZoneAnnotationKind<'n>

impl<'n> RefUnwindSafe for TimeZoneAnnotationKind<'n>

impl<'n> Send for TimeZoneAnnotationKind<'n>

impl<'n> Sync for TimeZoneAnnotationKind<'n>

impl<'n> Unpin for TimeZoneAnnotationKind<'n>

impl<'n> UnsafeUnpin for TimeZoneAnnotationKind<'n>

impl<'n> UnwindSafe for TimeZoneAnnotationKind<'n>

Blanket Implementations

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

impl<T> Borrow<T> for TimeZoneAnnotationKind<'n> where T: ?Sized,

impl<T> BorrowMut<T> for TimeZoneAnnotationKind<'n> where T: ?Sized,

impl<T> CloneToUninit for TimeZoneAnnotationKind<'n> where T: Clone,

impl<T> From<T> for TimeZoneAnnotationKind<'n>

impl<T> ToOwned for TimeZoneAnnotationKind<'n> where T: Clone,

impl<T, U> Into<U> for TimeZoneAnnotationKind<'n> where U: From<T>,

impl<T, U> TryFrom<U> for TimeZoneAnnotationKind<'n> where U: Into<T>,

impl<T, U> TryInto<U> for TimeZoneAnnotationKind<'n> where U: TryFrom<T>,