Struct subparse::SrtFile
[−]
[src]
pub struct SrtFile { /* fields omitted */ }
Represents a .srt
file.
Methods
impl SrtFile
[src]
fn parse(s: &str) -> SubtitleParserResult<SrtFile>
[src]
Parse a .srt
subtitle string to SrtFile
.
impl SrtFile
[src]
fn create(v: Vec<(TimeSpan, String)>) -> SubtitleParserResult<SrtFile>
[src]
Creates .srt file from scratch.
Trait Implementations
impl Debug for SrtFile
[src]
impl Clone for SrtFile
[src]
fn clone(&self) -> SrtFile
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl SubtitleFile for SrtFile
[src]
fn get_subtitle_entries(&self) -> SubtitleParserResult<Vec<SubtitleEntry>>
[src]
The subtitle entries can be changed by calling update_subtitle_entries()
.
fn update_subtitle_entries(
&mut self,
new_subtitle_entries: &[SubtitleEntry]
) -> SubtitleParserResult<()>
[src]
&mut self,
new_subtitle_entries: &[SubtitleEntry]
) -> SubtitleParserResult<()>
Set the entries from the subtitle entries from the get_subtitle_entries()
. Read more
fn to_data(&self) -> SubtitleParserResult<Vec<u8>>
[src]
Returns a byte-stream in the respective format (.ssa, .srt, etc.) with the (probably) altered information. Read more