pub enum Error {
ExecutableNotFound(String),
Io(Error),
ProcessFailed {
message: String,
exit_status: Option<ExitStatus>,
stderr: Option<String>,
},
InvalidArgument(String),
ParseError(String),
Timeout(Duration),
Unsupported(String),
InvalidOutput(String),
Multiple(Vec<Error>),
WithContext {
context: String,
source: Box<Error>,
},
}Expand description
Main error type for FFmpeg suite operations
Variants§
ExecutableNotFound(String)
FFmpeg/FFprobe/FFplay executable not found
Io(Error)
IO error occurred
ProcessFailed
Process execution failed
InvalidArgument(String)
Invalid argument provided
ParseError(String)
Parse error occurred
Timeout(Duration)
Timeout occurred
Unsupported(String)
Feature not supported
InvalidOutput(String)
Invalid output from FFmpeg tool
Multiple(Vec<Error>)
Multiple errors occurred
WithContext
Generic error with context
Implementations§
Source§impl Error
impl Error
Sourcepub fn process_failed(
message: impl Into<String>,
exit_status: Option<ExitStatus>,
stderr: Option<String>,
) -> Error
pub fn process_failed( message: impl Into<String>, exit_status: Option<ExitStatus>, stderr: Option<String>, ) -> Error
Create a process failed error
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Check if this is a timeout error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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