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(10, 30, 15));

assert!(tr.start().is_none());
assert!(tr.end().is_some());

Implementations

Constructs a new TimeRange from two chrono::NaiveTime values monotonically ordered in time.

Constructs a new TimeRange beginning with a chrono::NaiveTime value and no upper limit.

Constructs a new TimeRange with no lower limit, ending with a chrono::NaiveTime value.

Returns a reference to the lower bound of the range.

Returns a reference to the upper bound of the range.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.