#[non_exhaustive]pub enum BoolDecoderError {
InputTooShort,
EndOfStream,
}Expand description
Out-of-band conditions surfaced by BoolDecoder.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InputTooShort
Initialisation requested but fewer than two bytes of input are
available. The decoder reads two bytes into value during
init (RFC 6386 §7.3 init_bool_decoder) and cannot start
short of that.
EndOfStream
Renormalisation tried to pull a fresh byte but the input cursor has already passed the end of the partition. The spec relies on the encoder having appended enough flushed bytes to satisfy any reads the decoder issues; we surface this as an explicit error rather than silently returning zero bits, so callers can distinguish a truncated stream from a legitimate trailing boolean.
Trait Implementations§
Source§impl Clone for BoolDecoderError
impl Clone for BoolDecoderError
impl Copy for BoolDecoderError
Source§impl Debug for BoolDecoderError
impl Debug for BoolDecoderError
Source§impl Display for BoolDecoderError
impl Display for BoolDecoderError
impl Eq for BoolDecoderError
Source§impl Error for BoolDecoderError
impl Error for BoolDecoderError
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<BoolDecoderError> for CodedHeaderError
impl From<BoolDecoderError> for CodedHeaderError
Source§fn from(value: BoolDecoderError) -> Self
fn from(value: BoolDecoderError) -> Self
Converts to this type from the input type.
Source§impl From<BoolDecoderError> for DctTokenError
impl From<BoolDecoderError> for DctTokenError
Source§fn from(e: BoolDecoderError) -> Self
fn from(e: BoolDecoderError) -> Self
Converts to this type from the input type.
Source§impl From<BoolDecoderError> for DecodeError
impl From<BoolDecoderError> for DecodeError
Source§fn from(value: BoolDecoderError) -> Self
fn from(value: BoolDecoderError) -> Self
Converts to this type from the input type.
Source§impl From<BoolDecoderError> for MacroblockError
impl From<BoolDecoderError> for MacroblockError
Source§fn from(value: BoolDecoderError) -> Self
fn from(value: BoolDecoderError) -> Self
Converts to this type from the input type.
Source§impl From<BoolDecoderError> for InterMbError
impl From<BoolDecoderError> for InterMbError
Source§fn from(value: BoolDecoderError) -> Self
fn from(value: BoolDecoderError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BoolDecoderError
impl PartialEq for BoolDecoderError
impl StructuralPartialEq for BoolDecoderError
Auto Trait Implementations§
impl Forget for BoolDecoderError
impl Freeze for BoolDecoderError
impl Move for BoolDecoderError
impl RefUnwindSafe for BoolDecoderError
impl Send for BoolDecoderError
impl Sync for BoolDecoderError
impl Unpin for BoolDecoderError
impl UnsafeUnpin for BoolDecoderError
impl UnwindSafe for BoolDecoderError
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