pub struct OutputValidator;Expand description
Output configuration validator.
Implementations§
Source§impl OutputValidator
impl OutputValidator
Sourcepub fn validate_path(path: &str, overwrite: bool) -> Result<(), ValidationError>
pub fn validate_path(path: &str, overwrite: bool) -> Result<(), ValidationError>
Validates an output file path.
§Errors
Returns an error if the output path is invalid or not writable.
Sourcepub fn validate_format(path: &str) -> Result<String, ValidationError>
pub fn validate_format(path: &str) -> Result<String, ValidationError>
Validates output format based on file extension.
§Errors
Returns an error if the format is not supported.
Sourcepub fn validate_codec(codec: &str) -> Result<(), ValidationError>
pub fn validate_codec(codec: &str) -> Result<(), ValidationError>
Sourcepub fn validate_resolution(
width: u32,
height: u32,
) -> Result<(), ValidationError>
pub fn validate_resolution( width: u32, height: u32, ) -> Result<(), ValidationError>
Sourcepub fn validate_bitrate(
bitrate: u64,
min: u64,
max: u64,
) -> Result<(), ValidationError>
pub fn validate_bitrate( bitrate: u64, min: u64, max: u64, ) -> Result<(), ValidationError>
Sourcepub fn validate_frame_rate(num: u32, den: u32) -> Result<(), ValidationError>
pub fn validate_frame_rate(num: u32, den: u32) -> Result<(), ValidationError>
Auto Trait Implementations§
impl Freeze for OutputValidator
impl RefUnwindSafe for OutputValidator
impl Send for OutputValidator
impl Sync for OutputValidator
impl Unpin for OutputValidator
impl UnsafeUnpin for OutputValidator
impl UnwindSafe for OutputValidator
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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