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§
source§impl PartialEq for Duration
impl PartialEq for Duration
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)