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.
Fields§
§idx: u32The 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.
start: DurationThe timestamp where this subtitle should appear on screen.
end: DurationThe timestamp where this subtitle should be removed from the screen.
text: StringThe contents of the subtitle text.
This may contain some rudimetary formatting tags <b>...</b> which we
currently make no effort to parse.
Trait Implementations§
impl StructuralPartialEq for Subtitle
Auto Trait Implementations§
impl Freeze for Subtitle
impl RefUnwindSafe for Subtitle
impl Send for Subtitle
impl Sync for Subtitle
impl Unpin for Subtitle
impl UnwindSafe for Subtitle
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