pub struct SubtitleDocument {
pub cues: Vec<SubtitleCue>,
}Expand description
A parsed subtitle document containing a flat list of cues.
Fields§
§cues: Vec<SubtitleCue>Ordered list of subtitle cues.
Implementations§
Source§impl SubtitleDocument
impl SubtitleDocument
Sourcepub fn replace_text(&mut self, id: usize, text: String) -> bool
pub fn replace_text(&mut self, id: usize, text: String) -> bool
Replace the text of the cue with the given id.
Returns true if the cue was found and replaced, false if no cue
with that ID exists.
Trait Implementations§
Source§impl Clone for SubtitleDocument
impl Clone for SubtitleDocument
Source§fn clone(&self) -> SubtitleDocument
fn clone(&self) -> SubtitleDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubtitleDocument
impl Debug for SubtitleDocument
Source§impl PartialEq for SubtitleDocument
impl PartialEq for SubtitleDocument
Source§fn eq(&self, other: &SubtitleDocument) -> bool
fn eq(&self, other: &SubtitleDocument) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SubtitleDocument
impl StructuralPartialEq for SubtitleDocument
Auto Trait Implementations§
impl Freeze for SubtitleDocument
impl RefUnwindSafe for SubtitleDocument
impl Send for SubtitleDocument
impl Sync for SubtitleDocument
impl Unpin for SubtitleDocument
impl UnsafeUnpin for SubtitleDocument
impl UnwindSafe for SubtitleDocument
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