Struct subparse::timetypes::TimeSpan[][src]

pub struct TimeSpan {
    pub start: TimePoint,
    pub end: TimePoint,
}

A time span (e.g. time in which a subtitle is shown).

Fields

start: TimePoint

Start of the time span.

end: TimePoint

End of the time span.

Implementations

impl TimeSpan[src]

pub fn new(start: TimePoint, end: TimePoint) -> TimeSpan[src]

Constructor of TimeSpans.

pub fn len(&self) -> TimeDelta[src]

Get the length of the TimeSpan (can be negative).

Trait Implementations

impl Add<TimeDelta> for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the + operator.

impl AddAssign<TimeDelta> for TimeSpan[src]

impl Clone for TimeSpan[src]

impl Copy for TimeSpan[src]

impl Debug for TimeSpan[src]

impl Eq for TimeSpan[src]

impl From<TimeSpan> for SubtitleEntry[src]

impl Hash for TimeSpan[src]

impl Ord for TimeSpan[src]

impl PartialEq<TimeSpan> for TimeSpan[src]

impl PartialOrd<TimeSpan> for TimeSpan[src]

impl StructuralEq for TimeSpan[src]

impl StructuralPartialEq for TimeSpan[src]

impl Sub<TimeDelta> for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the - operator.

impl SubAssign<TimeDelta> for TimeSpan[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.