Struct DateTimeParser

Source
pub(super) struct DateTimeParser {
    _priv: (),
}
Expand description

A parser for Temporal datetimes.

Fields§

§_priv: ()

There are currently no configuration options for this parser.

Implementations§

Source§

impl DateTimeParser

Source

pub(super) const fn new() -> DateTimeParser

Create a new Temporal datetime parser with the default configuration.

Source

pub(super) fn parse_temporal_datetime<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedDateTime<'i>>, Error>

Source

pub(super) fn parse_temporal_time<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTime<'i>>, Error>

Source

pub(super) fn parse_time_zone<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTimeZone<'i>>, Error>

Source

fn parse_date_spec<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedDate<'i>>, Error>

Source

fn parse_time_spec<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTime<'i>>, Error>

Source

fn parse_month_day<'i>(&self, input: &'i [u8]) -> Result<Parsed<'i, ()>, Error>

Source

fn parse_year_month<'i>(&self, input: &'i [u8]) -> Result<Parsed<'i, ()>, Error>

Source

fn parse_year<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri16<-9999, 9999>>, Error>

Source

fn parse_month<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<1, 12>>, Error>

Source

fn parse_day<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<1, 31>>, Error>

Source

fn parse_hour<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 23>>, Error>

Source

fn parse_minute<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 59>>, Error>

Source

fn parse_second<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 59>>, Error>

Source

fn parse_offset<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, Option<ParsedOffset>>, Error>

Source

fn parse_annotations<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedAnnotations<'i>>, Error>

Source

fn parse_date_separator<'i>( &self, input: &'i [u8], extended: bool, ) -> Result<Parsed<'i, ()>, Error>

Parses the separator that is expected to appear between date components.

When in extended mode, a - is expected. When not in extended mode, no input is consumed and this routine never fails.

Source

fn parse_time_separator<'i>( &self, input: &'i [u8], extended: bool, ) -> Parsed<'i, bool>

Parses the separator that is expected to appear between time components. When true is returned, we expect to parse the next component. When false is returned, then no separator was found and there is no expectation of finding another component.

When in extended mode, true is returned if and only if a separator is found.

When in basic mode (not extended), then a subsequent component is only expected when input begins with two ASCII digits.

Source

fn parse_year_sign<'i>(&self, input: &'i [u8]) -> Parsed<'i, Option<ri8<-1, 1>>>

Trait Implementations§

Source§

impl Debug for DateTimeParser

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.