Struct time::parsing::Parsed [−][src]
pub struct Parsed { /* fields omitted */ }parsing only.Expand description
All information parsed.
This information is directly used to construct the final values.
Most users will not need think about this struct in any way. It is public to allow for manual control over values, in the instance that the default parser is insufficient.
Implementations
pub fn parse_item<'a>(
&mut self,
input: &'a [u8],
item: &FormatItem<'_>
) -> Result<&'a [u8], ParseFromDescription>
pub fn parse_item<'a>(
&mut self,
input: &'a [u8],
item: &FormatItem<'_>
) -> Result<&'a [u8], ParseFromDescription>
Parse a single FormatItem, mutating the struct. The remaining input is returned as the
Ok value.
pub fn parse_items<'a>(
&mut self,
input: &'a [u8],
items: &[FormatItem<'_>]
) -> Result<&'a [u8], ParseFromDescription>
pub fn parse_items<'a>(
&mut self,
input: &'a [u8],
items: &[FormatItem<'_>]
) -> Result<&'a [u8], ParseFromDescription>
Parse a sequence of FormatItems, mutating the struct. The remaining input is returned as
the Ok value.
Parse a literal byte sequence. The remaining input is returned as the Ok value.
Getter methods
Obtain the year_last_two component.
Obtain the iso_year_last_two component.
Obtain the sunday_week_number component.
Obtain the monday_week_number component.
Obtain the iso_week_number component.
Obtain the ordinal component.
Obtain the hour_12_is_pm component.
Obtain the offset_hour component.
Obtain the offset_minute component.
Obtain the offset_second component.
Setter methods
All setters return Option<()>, which is Some if the value was set, and None if not. The
setters may fail if the value is invalid, though behavior is not guaranteed.
Set the year_last_two component.
Set the iso_year component.
Set the iso_year_last_two component.
Set the sunday_week_number component.
Set the monday_week_number component.
Set the iso_week_number component.
Set the weekday component.
Set the ordinal component.
Set the hour_24 component.
Set the hour_12 component.
Set the hour_12_is_pm component.
Set the minute component.
Set the second component.
Set the subsecond component.
Set the offset_hour component.
Set the offset_minute component.
Set the offset_second component.
Builder methods
All builder methods return Option<Self>, which is Some if the value was set, and None if
not. The builder methods may fail if the value is invalid, though behavior is not guaranteed.
Set the year component and return self.
Set the year_last_two component and return self.
Set the iso_year component and return self.
Set the iso_year_last_two component and return self.
Set the month component and return self.
Set the sunday_week_number component and return self.
Set the monday_week_number component and return self.
Set the iso_week_number component and return self.
Set the weekday component and return self.
Set the ordinal component and return self.
Set the day component and return self.
Set the hour_24 component and return self.
Set the hour_12 component and return self.
Set the hour_12_is_pm component and return self.
Set the minute component and return self.
Set the second component and return self.
Set the subsecond component and return self.
Set the offset_hour component and return self.
Set the offset_minute component and return self.
Set the offset_second component and return self.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Parsed
impl UnwindSafe for Parsed
Blanket Implementations
Mutably borrows from an owned value. Read more