#[non_exhaustive]pub enum WeirError {
Decode(DecodeError),
}Expand description
Top-level error type for the weir-core crate.
#[non_exhaustive]: more top-level error categories may be added post-1.0
(the crate currently only decodes, but the type is the public error root), so
downstream matches must carry a wildcard arm.
Derives PartialEq/Eq to match its contained DecodeError, so callers can
assert on a WeirError directly (S45). If a future variant ever wraps a
non-Eq payload (e.g. io::Error), drop these derives and document why.
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.
Decode(DecodeError)
A wire frame failed to decode.
Trait Implementations§
impl Eq for WeirError
Source§impl Error for WeirError
impl Error for WeirError
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<DecodeError> for WeirError
impl From<DecodeError> for WeirError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for WeirError
Auto Trait Implementations§
impl Freeze for WeirError
impl RefUnwindSafe for WeirError
impl Send for WeirError
impl Sync for WeirError
impl Unpin for WeirError
impl UnsafeUnpin for WeirError
impl UnwindSafe for WeirError
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