pub struct DateRange { /* private fields */ }Expand description
Represents a date range as two Option<chrono::NaiveDate> values.
None means no upper or no lower bound for range is present.
Example
use chrono::NaiveDate;
use dicom_core::value::DateRange;
let dr = DateRange::from_start(NaiveDate::from_ymd(2000, 5, 3));
assert!(dr.start().is_some());
assert!(dr.end().is_none());Implementations
sourceimpl DateRange
impl DateRange
sourcepub fn from_start_to_end(
start: NaiveDate,
end: NaiveDate
) -> Result<DateRange, Error>
pub fn from_start_to_end(
start: NaiveDate,
end: NaiveDate
) -> Result<DateRange, Error>
Constructs a new DateRange from two chrono::NaiveDate values
monotonically ordered in time.
sourcepub fn from_start(start: NaiveDate) -> DateRange
pub fn from_start(start: NaiveDate) -> DateRange
Constructs a new DateRange beginning with a chrono::NaiveDate value
and no upper limit.
Trait Implementations
impl Copy for DateRange
impl Eq for DateRange
impl StructuralEq for DateRange
impl StructuralPartialEq for DateRange
Auto Trait Implementations
impl RefUnwindSafe for DateRange
impl Send for DateRange
impl Sync for DateRange
impl Unpin for DateRange
impl UnwindSafe for DateRange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more