pub struct Period {
pub num: i32,
pub unit: Unit,
}Expand description
A signed span of calendar time, e.g. 3 months or -2 weeks.
Days/Weeks add a fixed number of days. Months/Years are calendar
arithmetic: the day-of-month is preserved where possible and clamped to the
last day of the target month otherwise (so Jan 31 + 1 month = Feb 28, and
Feb 29 + 1 year = Feb 28 in a non-leap year).
Fields§
§num: i32§unit: UnitImplementations§
Trait Implementations§
impl Copy for Period
impl Eq for Period
impl StructuralPartialEq for Period
Auto Trait Implementations§
impl Freeze for Period
impl RefUnwindSafe for Period
impl Send for Period
impl Sync for Period
impl Unpin for Period
impl UnsafeUnpin for Period
impl UnwindSafe for Period
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