pub struct TimeRange { /* private fields */ }Expand description
Span of time between two moments, both included.
Implementations§
Source§impl TimeRange
impl TimeRange
Sourcepub const fn new(from: Timestamp, to: Timestamp) -> Result<Self, ValueError>
pub const fn new(from: Timestamp, to: Timestamp) -> Result<Self, ValueError>
Builds the range that starts at from and ends at to.
§Errors
Returns ValueError::InvertedRange when to lies before from.
Trait Implementations§
impl Copy for TimeRange
impl Eq for TimeRange
impl StructuralPartialEq for TimeRange
Auto Trait Implementations§
impl Forget for TimeRange
impl Freeze for TimeRange
impl Move for TimeRange
impl RefUnwindSafe for TimeRange
impl Send for TimeRange
impl Sync for TimeRange
impl Unpin for TimeRange
impl UnsafeUnpin for TimeRange
impl UnwindSafe for TimeRange
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