pub enum Duration {
YMDHMS {
year: u32,
month: u32,
day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
},
Weeks(u32),
}
Expand description
A time duration. Durations: https://www.rfc-editor.org/rfc/rfc3339#page-13 dur-second = 1DIGIT “S” dur-minute = 1DIGIT “M” [dur-second] dur-hour = 1DIGIT “H” [dur-minute] dur-time = “T” (dur-hour / dur-minute / dur-second) dur-day = 1DIGIT “D” dur-week = 1DIGIT “W” dur-month = 1DIGIT “M” [dur-day] dur-year = 1*DIGIT “Y” [dur-month] dur-date = (dur-day / dur-month / dur-year) [dur-time] duration = “P” (dur-date / dur-time / dur-week)
Variants§
YMDHMS
A duration specified by year, month, day, hour, minute and second units
Fields
Weeks(u32)
consists of week units
Implementations§
Trait Implementations§
impl Copy for Duration
impl Eq for Duration
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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