pub struct SrtFormat { /* private fields */ }Available on crate feature
std only.Expand description
SRT format handler with style preservation
Implementations§
Trait Implementations§
Source§impl Format for SrtFormat
impl Format for SrtFormat
Source§fn as_importer(&self) -> &dyn FormatImporter
fn as_importer(&self) -> &dyn FormatImporter
Get self as an importer (workaround for trait upcasting)
Source§fn as_exporter(&self) -> &dyn FormatExporter
fn as_exporter(&self) -> &dyn FormatExporter
Get self as an exporter (workaround for trait upcasting)
Source§fn supports_extension(&self, extension: &str) -> bool
fn supports_extension(&self, extension: &str) -> bool
Check if this format supports the given file extension
Source§impl FormatExporter for SrtFormat
impl FormatExporter for SrtFormat
Source§fn format_info(&self) -> &FormatInfo
fn format_info(&self) -> &FormatInfo
Get information about this format
Source§fn export_to_writer(
&self,
document: &EditorDocument,
writer: &mut dyn Write,
options: &FormatOptions,
) -> Result<FormatResult, EditorError>
fn export_to_writer( &self, document: &EditorDocument, writer: &mut dyn Write, options: &FormatOptions, ) -> Result<FormatResult, EditorError>
Export to a writer with the given options
Source§fn can_export(&self, extension: &str) -> bool
fn can_export(&self, extension: &str) -> bool
Check if this exporter can handle the given file extension
Source§fn export_to_path(
&self,
document: &EditorDocument,
path: &Path,
options: &FormatOptions,
) -> Result<FormatResult, EditorError>
fn export_to_path( &self, document: &EditorDocument, path: &Path, options: &FormatOptions, ) -> Result<FormatResult, EditorError>
Export to a file path
Source§fn export_to_string(
&self,
document: &EditorDocument,
options: &FormatOptions,
) -> Result<(String, FormatResult), EditorError>
fn export_to_string( &self, document: &EditorDocument, options: &FormatOptions, ) -> Result<(String, FormatResult), EditorError>
Export to a string
Source§impl FormatImporter for SrtFormat
impl FormatImporter for SrtFormat
Source§fn format_info(&self) -> &FormatInfo
fn format_info(&self) -> &FormatInfo
Get information about this format
Source§fn import_from_reader(
&self,
reader: &mut dyn Read,
options: &FormatOptions,
) -> Result<(EditorDocument, FormatResult), EditorError>
fn import_from_reader( &self, reader: &mut dyn Read, options: &FormatOptions, ) -> Result<(EditorDocument, FormatResult), EditorError>
Import from a reader with the given options
Source§fn can_import(&self, extension: &str) -> bool
fn can_import(&self, extension: &str) -> bool
Check if this importer can handle the given file extension
Source§fn import_from_path(
&self,
path: &Path,
options: &FormatOptions,
) -> Result<(EditorDocument, FormatResult), EditorError>
fn import_from_path( &self, path: &Path, options: &FormatOptions, ) -> Result<(EditorDocument, FormatResult), EditorError>
Import from a file path
Source§fn import_from_string(
&self,
content: &str,
options: &FormatOptions,
) -> Result<(EditorDocument, FormatResult), EditorError>
fn import_from_string( &self, content: &str, options: &FormatOptions, ) -> Result<(EditorDocument, FormatResult), EditorError>
Import from a string
Auto Trait Implementations§
impl Freeze for SrtFormat
impl RefUnwindSafe for SrtFormat
impl Send for SrtFormat
impl Sync for SrtFormat
impl Unpin for SrtFormat
impl UnwindSafe for SrtFormat
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