Struct time::parsing::Parsed [−][src]
#[non_exhaustive]pub struct Parsed {}Show fields
pub year: Option<i32>, pub year_last_two: Option<u8>, pub iso_year: Option<i32>, pub iso_year_last_two: Option<u8>, pub month: Option<Month>, pub sunday_week_number: Option<u8>, pub monday_week_number: Option<u8>, pub iso_week_number: Option<NonZeroU8>, pub weekday: Option<Weekday>, pub ordinal: Option<NonZeroU16>, pub day: Option<NonZeroU8>, pub hour_24: Option<u8>, pub hour_12: Option<NonZeroU8>, pub hour_12_is_pm: Option<bool>, pub minute: Option<u8>, pub second: Option<u8>, pub subsecond: Option<u32>, pub offset_hour: Option<i8>, pub offset_minute: Option<u8>, pub offset_second: Option<u8>,
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.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.year: Option<i32>
Calendar year.
year_last_two: Option<u8>
The last two digits of the calendar year.
iso_year: Option<i32>
Year of the ISO week date.
iso_year_last_two: Option<u8>
The last two digits of the ISO week year.
month: Option<Month>
Month of the year.
sunday_week_number: Option<u8>
Week of the year, where week one begins on the first Sunday of the calendar year.
monday_week_number: Option<u8>
Week of the year, where week one begins on the first Monday of the calendar year.
iso_week_number: Option<NonZeroU8>
Week of the year, where week one is the Monday-to-Sunday period containing January 4.
weekday: Option<Weekday>
Day of the week.
ordinal: Option<NonZeroU16>
Day of the year.
day: Option<NonZeroU8>
Day of the month.
hour_24: Option<u8>
Hour within the day.
hour_12: Option<NonZeroU8>
Hour within the 12-hour period (midnight to noon or vice versa). This is typically used in
conjunction with AM/PM, which is indicated by the hour_12_is_pm
field.
hour_12_is_pm: Option<bool>
Whether the hour_12
field indicates a time that “PM”.
minute: Option<u8>
Minute within the hour.
second: Option<u8>
Second within the minute.
subsecond: Option<u32>
Nanosecond within the second.
offset_hour: Option<i8>
Whole hours of the UTC offset.
offset_minute: Option<u8>
Minutes within the hour of the UTC offset.
offset_second: Option<u8>
Seconds within the minute of the UTC offset.
Implementations
Trait Implementations
impl TryFrom<Parsed> for PrimitiveDateTime
[src]
impl TryFrom<Parsed> for PrimitiveDateTime
[src]impl TryFrom<Parsed> for OffsetDateTime
[src]
impl TryFrom<Parsed> for OffsetDateTime
[src]impl Copy for Parsed
[src]
Auto Trait Implementations
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnwindSafe for Parsed
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more