Struct af_core::time::Span[][src]

pub struct Span { /* fields omitted */ }

An inclusive span between a start and end time.

Implementations

impl Span[src]

pub fn new(a: Time, b: Time) -> Self[src]

Creates a new span between two given times.

The earlier time becomes the start time, and the later time becomes the end time.

pub fn contains(&self, time: Time) -> bool[src]

Returns true if a given time is contained with the span.

pub fn duration(&self) -> Duration[src]

Returns a Duration equal to the time span in length.

pub fn end(&self) -> Time[src]

Returns the end time of the span.

pub fn overlaps(&self, rhs: Span) -> bool[src]

Returns true if the span overlaps another given span.

pub fn start(&self) -> Time[src]

Returns the start time of the span.

Trait Implementations

impl Add<Span> for Span[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Time> for Span[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Span> for Span[src]

impl AddAssign<Time> for Span[src]

impl Clone for Span[src]

impl Copy for Span[src]

impl Debug for Span[src]

impl Display for Span[src]

impl Eq for Span[src]

impl From<Range<Time>> for Span[src]

impl From<RangeInclusive<Time>> for Span[src]

impl From<Time> for Span[src]

impl PartialEq<Span> for Span[src]

impl StructuralEq for Span[src]

impl StructuralPartialEq for Span[src]

Auto Trait Implementations

impl RefUnwindSafe for Span

impl Send for Span

impl Sync for Span

impl Unpin for Span

impl UnwindSafe for Span

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,