pub trait SubtitleFormat {
// Required methods
fn parse(&self, content: &str) -> Result<Subtitle>;
fn serialize(&self, subtitle: &Subtitle) -> Result<String>;
fn detect(&self, content: &str) -> bool;
fn format_name(&self) -> &'static str;
fn file_extensions(&self) -> &'static [&'static str];
}Expand description
字幕格式 Trait 定義
Required Methods§
Sourcefn format_name(&self) -> &'static str
fn format_name(&self) -> &'static str
格式名稱
Sourcefn file_extensions(&self) -> &'static [&'static str]
fn file_extensions(&self) -> &'static [&'static str]
支援的副檔名