#[non_exhaustive]pub enum CodecError {
Malformed(String),
Canon(CanonError),
}Expand description
Errors raised by the codec runtime. Fails loudly — no fallbacks.
#[non_exhaustive]: a later 1.x release may add a variant, so a match
outside this crate needs a wildcard arm. Branch on the message’s bracketed
kind ([unknown-type], [fragment-reference], …) rather than the variant.
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.
Malformed(String)
A node, schema, or package context was malformed.
Canon(CanonError)
The underlying canonical library rejected a lexical/value.
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<CanonError> for CodecError
impl From<CanonError> for CodecError
Source§fn from(e: CanonError) -> Self
fn from(e: CanonError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for CodecError
impl Freeze for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin 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