enum ParsedTimeZone<'i> {
Named {
critical: bool,
name: &'i str,
},
Offset {
critical: bool,
offset: ParsedOffset,
},
}
Expand description
The result of parsing a time zone annotation.
Variants§
Named
The name of an IANA time zone was found.
Offset
A specific UTC numeric offset was found.
Fields
§
offset: ParsedOffset
The parsed UTC offset.
Implementations§
Source§impl<'i> ParsedTimeZone<'i>
impl<'i> ParsedTimeZone<'i>
Sourcepub(crate) fn to_time_zone_annotation(
&self,
) -> Result<TimeZoneAnnotation<'i>, Error>
pub(crate) fn to_time_zone_annotation( &self, ) -> Result<TimeZoneAnnotation<'i>, Error>
Turns this parsed time zone into a structured time zone annotation.
This can return an error if the parsed offset could not be converted
to a crate::tz::Offset
.
This also includes a flag of whether the annotation is “critical” or not.
Trait Implementations§
Auto Trait Implementations§
impl<'i> Freeze for ParsedTimeZone<'i>
impl<'i> RefUnwindSafe for ParsedTimeZone<'i>
impl<'i> Send for ParsedTimeZone<'i>
impl<'i> Sync for ParsedTimeZone<'i>
impl<'i> Unpin for ParsedTimeZone<'i>
impl<'i> UnwindSafe for ParsedTimeZone<'i>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more