pub struct DateRange { /* private fields */ }
Expand description
Representation of a half-open range of dates in the local time zone.
Implementations§
Source§impl DateRange
impl DateRange
Sourcepub fn new_opt(start: Date, end: Date) -> Option<Self>
pub fn new_opt(start: Date, end: Date) -> Option<Self>
Create DateRange
if the start date is less than the end date.
Sourcepub fn parse<'a, I>(datespec: &mut I) -> Result<Self>
pub fn parse<'a, I>(datespec: &mut I) -> Result<Self>
Create DateRange
from an iterator returning parts of a date range descriptor.
§Errors
- Return
DateError::InvalidDate
if the specification for a single day is not valid. - Return
DateError::InvalidDaySpec
if overall range specification is not valid.
Trait Implementations§
impl Eq for DateRange
impl StructuralPartialEq for DateRange
Auto Trait Implementations§
impl Freeze for DateRange
impl RefUnwindSafe for DateRange
impl Send for DateRange
impl Sync for DateRange
impl Unpin for DateRange
impl UnwindSafe for DateRange
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