pub struct TimeSpan {
pub start: TimeStamp,
pub end: TimeStamp,
}
Expand description
A timespan is a period between two moments in time. It differs from a duration, in the sense that a duration is not fixed on the global time scale.
Fields§
§start: TimeStamp
§end: TimeStamp
Implementations§
Source§impl TimeSpan
impl TimeSpan
pub fn new(start: TimeStamp, end: TimeStamp) -> Self
pub fn from_seconds(start: isize, end: isize) -> Self
pub fn extend_to_include(&mut self, time_point: &TimeStamp)
Sourcepub fn extend_to_include_span(&mut self, span: &Self)
pub fn extend_to_include_span(&mut self, span: &Self)
Adjust this timespan to include the given span.
pub fn contains(&self, timestamp: &TimeStamp) -> bool
Trait Implementations§
impl StructuralPartialEq for TimeSpan
Auto Trait Implementations§
impl Freeze for TimeSpan
impl RefUnwindSafe for TimeSpan
impl Send for TimeSpan
impl Sync for TimeSpan
impl Unpin for TimeSpan
impl UnwindSafe for TimeSpan
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