pub struct FormatConverter { /* private fields */ }Expand description
Subtitle format converter for handling conversion tasks.
The FormatConverter coordinates conversion requests across
multiple subtitle formats, managing concurrency and task scheduling.
Implementations§
Source§impl FormatConverter
impl FormatConverter
Sourcepub fn new(config: ConversionConfig) -> Self
pub fn new(config: ConversionConfig) -> Self
Create new converter
Sourcepub async fn convert_file(
&self,
input_path: &Path,
output_path: &Path,
target_format: &str,
) -> Result<ConversionResult>
pub async fn convert_file( &self, input_path: &Path, output_path: &Path, target_format: &str, ) -> Result<ConversionResult>
Convert single file
Sourcepub async fn convert_batch(
&self,
input_dir: &Path,
target_format: &str,
recursive: bool,
) -> Result<Vec<ConversionResult>>
pub async fn convert_batch( &self, input_dir: &Path, target_format: &str, recursive: bool, ) -> Result<Vec<ConversionResult>>
Batch convert files
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FormatConverter
impl !RefUnwindSafe for FormatConverter
impl !Send for FormatConverter
impl !Sync for FormatConverter
impl Unpin for FormatConverter
impl !UnwindSafe for FormatConverter
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