pub enum CodecError {
FormatMismatch {
expected: FourCc,
actual: FourCc,
},
Codec(String),
Backpressure,
}Expand description
Errors emitted by codecs.
§Example
use styx_codec::CodecError;
use styx_core::prelude::FourCc;
let err = CodecError::FormatMismatch {
expected: FourCc::new(*b"MJPG"),
actual: FourCc::new(*b"RG24"),
};
assert!(matches!(err, CodecError::FormatMismatch { .. }));Variants§
FormatMismatch
Input did not match the expected FourCc.
Codec(String)
Codec-specific failure detail.
Backpressure
The codec accepted input but did not (yet) produce output (e.g. encoder pipeline delay).
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
1.30.0 · 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()
Source§impl From<CodecError> for RegistryError
impl From<CodecError> for RegistryError
Source§fn from(source: CodecError) -> Self
fn from(source: CodecError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnwindSafe for CodecError
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