pub struct Subtitle {
pub idx: u32,
pub start: Duration,
pub end: Duration,
pub text: String,
}
Expand description
A single Subtitle record with timing and text information.
the std::fmt::Display
impl for this type will reproduce
the SRT formatted text.
The index within the SRT file. The spec says this should be a number
that increases through the file, but this is should not be relied upon.
see utils::out_of_order_subs
for more information.
The timestamp where this subtitle should appear on screen.
The timestamp where this subtitle should be removed from the screen.
The contents of the subtitle text.
This may contain some rudimetary formatting tags <b>...</b>
which we
currently make no effort to parse.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.