pub struct InputValidator;Expand description
Input file validator.
Implementations§
Source§impl InputValidator
impl InputValidator
Sourcepub fn validate_path(path: &str) -> Result<(), ValidationError>
pub fn validate_path(path: &str) -> Result<(), ValidationError>
Validates an input file path.
§Errors
Returns an error if the input file is invalid or inaccessible.
Sourcepub fn validate_format(path: &str) -> Result<String, ValidationError>
pub fn validate_format(path: &str) -> Result<String, ValidationError>
Validates input format based on file extension.
§Errors
Returns an error if the format is not supported.
Sourcepub fn validate_streams(
has_video: bool,
has_audio: bool,
require_video: bool,
require_audio: bool,
) -> Result<(), ValidationError>
pub fn validate_streams( has_video: bool, has_audio: bool, require_video: bool, require_audio: bool, ) -> Result<(), ValidationError>
Validates that input has required streams.
Auto Trait Implementations§
impl Freeze for InputValidator
impl RefUnwindSafe for InputValidator
impl Send for InputValidator
impl Sync for InputValidator
impl Unpin for InputValidator
impl UnsafeUnpin for InputValidator
impl UnwindSafe for InputValidator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more