Enum constriction::stream::TryCodingError
source · pub enum TryCodingError<CodingError, ModelError> {
InvalidEntropyModel(ModelError),
CodingError(CodingError),
}
Expand description
The error type for Encode::try_encode_symbols
and Decode::try_decode_symbols
.
Variants§
InvalidEntropyModel(ModelError)
The iterator provided to Encode::try_encode_symbols
or
Decode::try_decode_symbols
yielded Err(_)
.
The variant wraps the original error, which can also be retrieved via
Error::source
if both ModelError
and CodingError
implement
std::error::Error
and if not compiled in no_std
mode.
CodingError(CodingError)
The iterator provided to Encode::try_encode_symbols
or
Decode::try_decode_symbols
yielded Ok(_)
but encoding or decoding resulted in
an error.
The variant wraps the original error, which can also be retrieved via
Error::source
if both ModelError
and CodingError
implement
std::error::Error
and if not compiled in no_std
mode.
Trait Implementations§
source§impl<CodingError: Debug, ModelError: Debug> Debug for TryCodingError<CodingError, ModelError>
impl<CodingError: Debug, ModelError: Debug> Debug for TryCodingError<CodingError, ModelError>
source§impl<CodingError: Display, ModelError: Display> Display for TryCodingError<CodingError, ModelError>
impl<CodingError: Display, ModelError: Display> Display for TryCodingError<CodingError, ModelError>
source§impl<CodingError: Error + 'static, ModelError: Error + 'static> Error for TryCodingError<CodingError, ModelError>
impl<CodingError: Error + 'static, ModelError: Error + 'static> Error for TryCodingError<CodingError, ModelError>
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<CodingError, ModelError> From<CodingError> for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> From<CodingError> for TryCodingError<CodingError, ModelError>
source§impl<CodingError: PartialEq, ModelError: PartialEq> PartialEq for TryCodingError<CodingError, ModelError>
impl<CodingError: PartialEq, ModelError: PartialEq> PartialEq for TryCodingError<CodingError, ModelError>
source§fn eq(&self, other: &TryCodingError<CodingError, ModelError>) -> bool
fn eq(&self, other: &TryCodingError<CodingError, ModelError>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<CodingError: Eq, ModelError: Eq> Eq for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> StructuralPartialEq for TryCodingError<CodingError, ModelError>
Auto Trait Implementations§
impl<CodingError, ModelError> Freeze for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> RefUnwindSafe for TryCodingError<CodingError, ModelError>where
ModelError: RefUnwindSafe,
CodingError: RefUnwindSafe,
impl<CodingError, ModelError> Send for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> Sync for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> Unpin for TryCodingError<CodingError, ModelError>
impl<CodingError, ModelError> UnwindSafe for TryCodingError<CodingError, ModelError>where
ModelError: UnwindSafe,
CodingError: UnwindSafe,
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