pub struct YearRange { /* private fields */ }Expand description
A year range that ensures that bounds are always in the right order
Implementations§
Source§impl YearRange
impl YearRange
Sourcepub fn new(range: RangeInclusive<Year>, step: u16) -> Option<Self>
pub fn new(range: RangeInclusive<Year>, step: u16) -> Option<Self>
Create a new YearRange. Return None if the bounds are in the wrong order.
Sourcepub fn into_parts(&self) -> (RangeInclusive<Year>, u16)
pub fn into_parts(&self) -> (RangeInclusive<Year>, u16)
Extract range and step from this object.
Trait Implementations§
impl Eq for YearRange
impl StructuralPartialEq for YearRange
Auto Trait Implementations§
impl Freeze for YearRange
impl RefUnwindSafe for YearRange
impl Send for YearRange
impl Sync for YearRange
impl Unpin for YearRange
impl UnsafeUnpin for YearRange
impl UnwindSafe for YearRange
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