pub enum MjpegError {
InvalidData(String),
Unsupported(String),
Other(String),
Eof,
NeedMore,
}Expand description
Crate-local error type for the JPEG decoder/encoder pipeline.
Variants mirror the subset of oxideav_core::Error the codec can
hit. Transport (Io) and framework-specific (FormatNotFound,
CodecNotFound) errors are intentionally absent — they originate
in callers that are already linking oxideav-core.
Variants§
InvalidData(String)
The bitstream is malformed (bad marker, truncated segment, invalid Huffman code length, etc.).
Unsupported(String)
The bitstream uses a feature this codec doesn’t implement (hierarchical SOF, progressive arithmetic, etc.) or the encoder was asked to emit a frame in a format it doesn’t support.
Other(String)
Catch-all for misuse errors that aren’t bitstream-level (e.g. trait-API contract violations).
Eof
End of stream — no more packets / frames forthcoming.
NeedMore
More input is required before another frame can be produced (decoder) or another packet can be flushed (encoder).
Implementations§
Source§impl MjpegError
impl MjpegError
Sourcepub fn invalid(msg: impl Into<String>) -> Self
pub fn invalid(msg: impl Into<String>) -> Self
Construct an MjpegError::InvalidData from a stringy message.
Sourcepub fn unsupported(msg: impl Into<String>) -> Self
pub fn unsupported(msg: impl Into<String>) -> Self
Construct an MjpegError::Unsupported from a stringy message.
Sourcepub fn other(msg: impl Into<String>) -> Self
pub fn other(msg: impl Into<String>) -> Self
Construct an MjpegError::Other from a stringy message.
Trait Implementations§
Source§impl Clone for MjpegError
impl Clone for MjpegError
Source§fn clone(&self) -> MjpegError
fn clone(&self) -> MjpegError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MjpegError
impl Debug for MjpegError
Source§impl Display for MjpegError
impl Display for MjpegError
impl Eq for MjpegError
Source§impl Error for MjpegError
impl Error for MjpegError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<MjpegError> for Error
impl From<MjpegError> for Error
Source§fn from(e: MjpegError) -> Self
fn from(e: MjpegError) -> Self
Source§impl PartialEq for MjpegError
impl PartialEq for MjpegError
Source§fn eq(&self, other: &MjpegError) -> bool
fn eq(&self, other: &MjpegError) -> bool
self and other values to be equal, and is used by ==.