Struct dicom_core::value::range::TimeRange
source · pub struct TimeRange { /* private fields */ }Expand description
Represents a time range as two Option<chrono::NaiveTime> values.
None means no upper or no lower bound for range is present.
Example
use chrono::NaiveTime;
use dicom_core::value::TimeRange;
let tr = TimeRange::from_end(NaiveTime::from_hms_opt(10, 30, 15).unwrap());
assert!(tr.start().is_none());
assert!(tr.end().is_some());Implementations§
source§impl TimeRange
impl TimeRange
sourcepub fn from_start_to_end(
start: NaiveTime,
end: NaiveTime
) -> Result<TimeRange, Error>
pub fn from_start_to_end(
start: NaiveTime,
end: NaiveTime
) -> Result<TimeRange, Error>
Constructs a new TimeRange from two chrono::NaiveTime values
monotonically ordered in time.
sourcepub fn from_start(start: NaiveTime) -> TimeRange
pub fn from_start(start: NaiveTime) -> TimeRange
Constructs a new TimeRange beginning with a chrono::NaiveTime value
and no upper limit.