Struct substudy::srt::SubtitleFile [] [src]

pub struct SubtitleFile {
    pub subtitles: Vec<Subtitle>,
}

The contents of an SRT-format subtitle file.

Fields

subtitles: Vec<Subtitle>

The subtitles in this file.

Methods

impl SubtitleFile
[src]

fn from_str(data: &str) -> Result<SubtitleFile>

Parse raw subtitle text into an appropriate structure.

fn from_path(path: &Path) -> Result<SubtitleFile>

Parse the subtitle file found at the specified path.

fn cleaned_from_path(path: &Path) -> Result<SubtitleFile>

Parse and normalize the subtitle file found at the specified path.

fn to_string(&self) -> String

Convert subtitles to a string.

fn find(&self, index: usize) -> Option<&Subtitle>

Find the subtitle with the given index.

Trait Implementations

impl PartialEq for SubtitleFile
[src]

fn eq(&self, __arg_0: &SubtitleFile) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &SubtitleFile) -> bool

This method tests for !=.

impl Debug for SubtitleFile
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.