Struct aspasia::PlainSubtitle
source · pub struct PlainSubtitle { /* private fields */ }
Expand description
Basic subtitle data containing only the textual content and start/end timing with no style or formatting information
Implementations§
source§impl PlainSubtitle
impl PlainSubtitle
sourcepub fn from_events(events: Vec<PlainEvent>) -> Self
pub fn from_events(events: Vec<PlainEvent>) -> Self
Create new instance using a list of already defined PlainEvent
s
sourcepub fn events(&self) -> &[PlainEvent]
pub fn events(&self) -> &[PlainEvent]
Get list of events as a slice
sourcepub fn events_mut(&mut self) -> &mut [PlainEvent]
pub fn events_mut(&mut self) -> &mut [PlainEvent]
Get list of events as a mutable slice
sourcepub fn event(&self, index: usize) -> Option<&PlainEvent>
pub fn event(&self, index: usize) -> Option<&PlainEvent>
Retrieve event at index
sourcepub fn event_mut(&mut self, index: usize) -> Option<&mut PlainEvent>
pub fn event_mut(&mut self, index: usize) -> Option<&mut PlainEvent>
Get mutable event at index
Trait Implementations§
source§impl Clone for PlainSubtitle
impl Clone for PlainSubtitle
source§fn clone(&self) -> PlainSubtitle
fn clone(&self) -> PlainSubtitle
Returns a copy of the value. Read more
1.0.0 · 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 PlainSubtitle
impl Debug for PlainSubtitle
source§impl Default for PlainSubtitle
impl Default for PlainSubtitle
source§impl<T: TimedSubtitle + TextSubtitle> From<&T> for PlainSubtitle
impl<T: TimedSubtitle + TextSubtitle> From<&T> for PlainSubtitle
source§impl From<PlainSubtitle> for AssSubtitle
impl From<PlainSubtitle> for AssSubtitle
source§fn from(value: PlainSubtitle) -> Self
fn from(value: PlainSubtitle) -> Self
Converts to this type from the input type.
source§impl From<PlainSubtitle> for SsaSubtitle
impl From<PlainSubtitle> for SsaSubtitle
source§fn from(value: PlainSubtitle) -> Self
fn from(value: PlainSubtitle) -> Self
Converts to this type from the input type.
source§impl From<PlainSubtitle> for SubRipSubtitle
impl From<PlainSubtitle> for SubRipSubtitle
source§fn from(value: PlainSubtitle) -> Self
fn from(value: PlainSubtitle) -> Self
Converts to this type from the input type.
source§impl From<PlainSubtitle> for WebVttSubtitle
impl From<PlainSubtitle> for WebVttSubtitle
source§fn from(value: PlainSubtitle) -> Self
fn from(value: PlainSubtitle) -> Self
Converts to this type from the input type.
source§impl From<TimedSubtitleFile> for PlainSubtitle
impl From<TimedSubtitleFile> for PlainSubtitle
source§fn from(value: TimedSubtitleFile) -> Self
fn from(value: TimedSubtitleFile) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for PlainSubtitle
impl Send for PlainSubtitle
impl Sync for PlainSubtitle
impl Unpin for PlainSubtitle
impl UnwindSafe for PlainSubtitle
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