Skip to main content

CommonIssuesFixer

Struct CommonIssuesFixer 

Source
pub struct CommonIssuesFixer {
    pub remove_gaps: bool,
}

Fields§

§remove_gaps: bool

Implementations§

Trait Implementations§

Source§

impl AsyncBaseProcessor for CommonIssuesFixer

Source§

fn process_async<'life0, 'life1, 'async_trait>( &'life0 self, srt: SubRipFile, language: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<(SubRipFile, bool), SubtitleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Processes a SubRipFile and reports whether the output changed.
Source§

fn from_srt_async<'life0, 'life1, 'async_trait>( &'life0 self, srt: SubRipFile, language: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<(SubRipFile, bool), SubtitleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Applies subtitle cleanup or transformation passes in async applications. Read more
Source§

fn from_file_async<'life0, 'life1, 'async_trait, P>( &'life0 self, file: P, language: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<(SubRipFile, bool), SubtitleError>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads an SRT file asynchronously and processes it.
Source§

fn from_string_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, data: &'life1 str, language: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<(SubRipFile, bool), SubtitleError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Parses an SRT string and processes it in an async context.
Source§

impl BaseProcessor for CommonIssuesFixer

Source§

fn process( &self, srt: SubRipFile, language: Option<&str>, ) -> Result<(SubRipFile, bool), SubtitleError>

Processes a SubRipFile and reports whether the output changed.
Source§

fn from_srt( &self, srt: SubRipFile, language: Option<&str>, ) -> Result<(SubRipFile, bool), SubtitleError>

Applies subtitle cleanup or transformation passes to SubRipFile values.
Source§

fn from_file<P: AsRef<Path>>( &self, file: P, language: Option<&str>, ) -> Result<(SubRipFile, bool), SubtitleError>

Reads an SRT file and processes it synchronously.
Source§

fn from_string( &self, data: &str, language: Option<&str>, ) -> Result<(SubRipFile, bool), SubtitleError>

Parses an SRT string and processes it synchronously.
Source§

impl Clone for CommonIssuesFixer

Source§

fn clone(&self) -> CommonIssuesFixer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for CommonIssuesFixer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.