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
impl DateTimeParser
Sourcepub(super) const fn new() -> DateTimeParser
pub(super) const fn new() -> DateTimeParser
Create a new Temporal datetime parser with the default configuration.
pub(super) fn parse_temporal_datetime<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedDateTime<'i>>, Error>
pub(super) fn parse_temporal_time<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTime<'i>>, Error>
pub(super) fn parse_time_zone<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTimeZone<'i>>, Error>
fn parse_date_spec<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedDate<'i>>, Error>
fn parse_time_spec<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedTime<'i>>, Error>
fn parse_month_day<'i>(&self, input: &'i [u8]) -> Result<Parsed<'i, ()>, Error>
fn parse_year_month<'i>(&self, input: &'i [u8]) -> Result<Parsed<'i, ()>, Error>
fn parse_year<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri16<-9999, 9999>>, Error>
fn parse_month<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<1, 12>>, Error>
fn parse_day<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<1, 31>>, Error>
fn parse_hour<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 23>>, Error>
fn parse_minute<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 59>>, Error>
fn parse_second<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ri8<0, 59>>, Error>
fn parse_offset<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, Option<ParsedOffset>>, Error>
fn parse_annotations<'i>( &self, input: &'i [u8], ) -> Result<Parsed<'i, ParsedAnnotations<'i>>, Error>
Sourcefn parse_date_separator<'i>(
&self,
input: &'i [u8],
extended: bool,
) -> Result<Parsed<'i, ()>, Error>
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.
Sourcefn parse_time_separator<'i>(
&self,
input: &'i [u8],
extended: bool,
) -> Parsed<'i, bool>
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.