Enum TimeZoneAnnotationKind

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(crate::tz::Offset)

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

Implementations

impl<'n> TimeZoneAnnotationKind<'n>

fn into_owned(self: 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.

impl From for TimeZoneAnnotationKind<'static>

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

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

fn clone(self: &Self) -> TimeZoneAnnotationKind<'n>

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

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

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

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

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

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

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

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

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

fn eq(self: &Self, other: &TimeZoneAnnotationKind<'n>) -> bool

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

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

impl<'n> StructuralPartialEq 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>

impl<T> Any for TimeZoneAnnotationKind<'n>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TimeZoneAnnotationKind<'n>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TimeZoneAnnotationKind<'n>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for TimeZoneAnnotationKind<'n>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for TimeZoneAnnotationKind<'n>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for TimeZoneAnnotationKind<'n>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for TimeZoneAnnotationKind<'n>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for TimeZoneAnnotationKind<'n>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TimeZoneAnnotationKind<'n>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>