#[non_exhaustive]pub enum TimeExpression {
ClockTime {
hours: u32,
minutes: u8,
seconds: u8,
fraction: Option<String>,
frames: Option<u32>,
sub_frames: Option<u32>,
},
OffsetTime {
count: u64,
fraction: Option<String>,
metric: TimeMetric,
},
WallclockTime {
form: WallclockForm,
},
}Expand description
A parsed time expression.
While the grammar in §12.3.1 defines three forms (clock-time, offset-time, wallclock-time), we represent all parsed time expressions uniformly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ClockTime
Clock-time: HH:MM:SS[.fraction][:frames[.sub-frames]]
Fields
OffsetTime
Offset-time: count[.fraction]metric
Fields
§
metric: TimeMetricThe metric unit.
WallclockTime
Wallclock-time: wallclock(date-time|wall-time|date)
Fields
§
form: WallclockFormThe wallclock form: date-time, wall-time, or date.
Trait Implementations§
Source§impl Clone for TimeExpression
impl Clone for TimeExpression
Source§fn clone(&self) -> TimeExpression
fn clone(&self) -> TimeExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeExpression
impl Debug for TimeExpression
Source§impl PartialEq for TimeExpression
impl PartialEq for TimeExpression
impl StructuralPartialEq for TimeExpression
Auto Trait Implementations§
impl Freeze for TimeExpression
impl RefUnwindSafe for TimeExpression
impl Send for TimeExpression
impl Sync for TimeExpression
impl Unpin for TimeExpression
impl UnsafeUnpin for TimeExpression
impl UnwindSafe for TimeExpression
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more