pub(super) struct ParsedDateTime<'i> {
input: Bytes<'i>,
date: ParsedDate<'i>,
time: Option<ParsedTime<'i>>,
offset: Option<ParsedOffset>,
annotations: ParsedAnnotations<'i>,
}
Expand description
The datetime components parsed from a string.
Fields§
§input: Bytes<'i>
The original input that the datetime was parsed from.
date: ParsedDate<'i>
A required civil date.
time: Option<ParsedTime<'i>>
An optional civil time.
offset: Option<ParsedOffset>
An optional UTC offset.
annotations: ParsedAnnotations<'i>
An optional RFC 9557 annotations parsed.
An empty ParsedAnnotations
is valid and possible, so this bakes
optionality into the type and doesn’t need to be an Option
itself.
Implementations§
Source§impl<'i> ParsedDateTime<'i>
impl<'i> ParsedDateTime<'i>
pub(super) fn to_pieces(&self) -> Result<Pieces<'i>, Error>
pub(super) fn to_zoned( &self, db: &TimeZoneDatabase, offset_conflict: OffsetConflict, disambiguation: Disambiguation, ) -> Result<Zoned, Error>
pub(super) fn to_ambiguous_zoned( &self, db: &TimeZoneDatabase, offset_conflict: OffsetConflict, ) -> Result<AmbiguousZoned, Error>
pub(super) fn to_timestamp(&self) -> Result<Timestamp, Error>
pub(super) fn to_datetime(&self) -> Result<DateTime, Error>
pub(super) fn to_date(&self) -> Result<Date, Error>
fn time(&self) -> Time
Trait Implementations§
Source§impl<'i> Debug for ParsedDateTime<'i>
impl<'i> Debug for ParsedDateTime<'i>
Auto Trait Implementations§
impl<'i> Freeze for ParsedDateTime<'i>
impl<'i> RefUnwindSafe for ParsedDateTime<'i>
impl<'i> Send for ParsedDateTime<'i>
impl<'i> Sync for ParsedDateTime<'i>
impl<'i> Unpin for ParsedDateTime<'i>
impl<'i> UnwindSafe for ParsedDateTime<'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