Struct time::parsing::Parsed[][src]

pub struct Parsed { /* fields omitted */ }
This is supported on crate feature 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

Create a new instance of Parsed with no information known.

Parse a single FormatItem, mutating the struct. The remaining input is returned as the Ok value.

If a FormatItem::Optional is passed, parsing will not fail; the input will be returned as-is if the expected format is not present.

Parse a sequence of FormatItems, mutating the struct. The remaining input is returned as the Ok value.

This method will fail if any of the contained FormatItems fail to parse. self will not be mutated in this instance.

Parse a literal byte sequence. The remaining input is returned as the Ok value.

Parse a single component, mutating the struct. The remaining input is returned as the Ok value.

Getter methods

Obtain the year component.

Obtain the year_last_two component.

Obtain the iso_year component.

Obtain the iso_year_last_two component.

Obtain the month component.

Obtain the sunday_week_number component.

Obtain the monday_week_number component.

Obtain the iso_week_number component.

Obtain the weekday component.

Obtain the ordinal component.

Obtain the day component.

Obtain the hour_24 component.

Obtain the hour_12 component.

Obtain the hour_12_is_pm component.

Obtain the minute component.

Obtain the second component.

Obtain the subsecond 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 component.

Set the year_last_two component.

Set the iso_year component.

Set the iso_year_last_two component.

Set the month 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 day 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.