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