Struct TimeZoneAnnotationName
pub struct TimeZoneAnnotationName<'n> { /* private fields */ }
A time zone annotation parsed from a datetime string.
By default, a time zone annotation name borrows its name from the
input it was parsed from. When the alloc feature is enabled,
callers can de-couple the annotation from the parsed input with
TimeZoneAnnotationName::into_owned.
A value of this type is usually found via Pieces::time_zone_annotation,
but callers can also construct one via this type's From<&str> trait
implementation if necessary.
Implementations
impl<'n> TimeZoneAnnotationName<'n>
fn as_str<'a>(&'a self) -> &'a strReturns the name of this time zone annotation as a string slice.
Note that the lifetime of the string slice returned is tied to the lifetime of this time zone annotation. This may be shorter than the lifetime of the string,
'n, in this annotation.fn into_owned(self) -> TimeZoneAnnotationName<'static>Converts this time zone annotation name into an "owned" value whose lifetime is
'static.If this was already an "owned" value, then this is a no-op.
Trait Implementations
impl<'n> Clone for TimeZoneAnnotationName<'n>
fn clone(&self) -> TimeZoneAnnotationName<'n>
impl<'n> Debug for TimeZoneAnnotationName<'n>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'n> Eq for TimeZoneAnnotationName<'n>
impl<'n> From<&'n str> for TimeZoneAnnotationName<'n>
fn from(string: &'n str) -> TimeZoneAnnotationName<'n>
impl<'n> Hash for TimeZoneAnnotationName<'n>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<'n> PartialEq for TimeZoneAnnotationName<'n>
fn eq(&self, other: &TimeZoneAnnotationName<'n>) -> bool
impl<'n> StructuralPartialEq for TimeZoneAnnotationName<'n>
Auto Trait Implementations
impl<'n> Freeze for TimeZoneAnnotationName<'n>
impl<'n> RefUnwindSafe for TimeZoneAnnotationName<'n>
impl<'n> Send for TimeZoneAnnotationName<'n>
impl<'n> Sync for TimeZoneAnnotationName<'n>
impl<'n> Unpin for TimeZoneAnnotationName<'n>
impl<'n> UnsafeUnpin for TimeZoneAnnotationName<'n>
impl<'n> UnwindSafe for TimeZoneAnnotationName<'n>
Blanket Implementations
impl<T> Any for TimeZoneAnnotationName<'n>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TimeZoneAnnotationName<'n>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TimeZoneAnnotationName<'n>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TimeZoneAnnotationName<'n>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TimeZoneAnnotationName<'n>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TimeZoneAnnotationName<'n>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for TimeZoneAnnotationName<'n>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TimeZoneAnnotationName<'n>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TimeZoneAnnotationName<'n>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>