pub struct Span { /* private fields */ }Expand description
An inclusive span between a start and end time.
Implementations§
Source§impl Span
impl Span
Sourcepub fn new(a: Time, b: Time) -> Self
pub fn new(a: Time, b: Time) -> Self
Creates a new span between two given times.
The earlier time becomes the start time, and the later time becomes the end time.
Sourcepub fn contains(&self, time: Time) -> bool
pub fn contains(&self, time: Time) -> bool
Returns true if a given time is contained with the span.
Trait Implementations§
Source§impl AddAssign<Time> for Span
impl AddAssign<Time> for Span
Source§fn add_assign(&mut self, rhs: Time)
fn add_assign(&mut self, rhs: Time)
Performs the
+= operation. Read moreSource§impl AddAssign for Span
impl AddAssign for Span
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl From<RangeInclusive<Time>> for Span
impl From<RangeInclusive<Time>> for Span
Source§fn from(range: RangeInclusive<Time>) -> Self
fn from(range: RangeInclusive<Time>) -> Self
Converts to this type from the input type.
impl Copy for Span
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
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