pub(crate) struct ParsedAnnotations<'i> {
time_zone: Option<ParsedTimeZone<'i>>,
}Expand description
The result of parsing RFC 9557 annotations.
Currently, this only provides access to a parsed time zone annotation, if present. While the parser does validate all other key/value annotations, Jiff doesn’t make use of them and thus does not expose them here. They are only validated at a syntax level.
Fields§
§time_zone: Option<ParsedTimeZone<'i>>An optional time zone annotation that was extracted from the input.
Implementations§
Source§impl<'i> ParsedAnnotations<'i>
impl<'i> ParsedAnnotations<'i>
Sourcepub(crate) fn none() -> ParsedAnnotations<'static>
pub(crate) fn none() -> ParsedAnnotations<'static>
Return an empty parsed annotations.
Sourcepub(crate) fn to_time_zone_annotation(
&self,
) -> Result<Option<TimeZoneAnnotation<'i>>, Error>
pub(crate) fn to_time_zone_annotation( &self, ) -> Result<Option<TimeZoneAnnotation<'i>>, Error>
Turns this parsed time zone into a structured time zone annotation,
if an annotation was found. Otherwise, returns Ok(None).
This can return an error if the parsed offset could not be converted
to a crate::tz::Offset.
Trait Implementations§
Source§impl<'i> Debug for ParsedAnnotations<'i>
impl<'i> Debug for ParsedAnnotations<'i>
Auto Trait Implementations§
impl<'i> Freeze for ParsedAnnotations<'i>
impl<'i> RefUnwindSafe for ParsedAnnotations<'i>
impl<'i> Send for ParsedAnnotations<'i>
impl<'i> Sync for ParsedAnnotations<'i>
impl<'i> Unpin for ParsedAnnotations<'i>
impl<'i> UnwindSafe for ParsedAnnotations<'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