pub enum StandardDecodeError {
ExhaustedInput,
InvalidOpcode,
InvalidOperand,
}
Expand description
a minimal enum implementing DecodeError
. this is intended to be enough for a low effort,
low-fidelity error taxonomy, without boilerplate of a DecodeError
implementation.
Variants§
Trait Implementations§
Source§impl Clone for StandardDecodeError
impl Clone for StandardDecodeError
Source§fn clone(&self) -> StandardDecodeError
fn clone(&self) -> StandardDecodeError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StandardDecodeError
impl Debug for StandardDecodeError
Source§impl DecodeError for StandardDecodeError
impl DecodeError for StandardDecodeError
Source§fn data_exhausted(&self) -> bool
fn data_exhausted(&self) -> bool
did the decoder fail because it reached the end of input?
Source§fn bad_opcode(&self) -> bool
fn bad_opcode(&self) -> bool
did the decoder error because the instruction’s opcode is invalid? Read more
Source§fn bad_operand(&self) -> bool
fn bad_operand(&self) -> bool
did the decoder error because an operand of the instruction to decode is invalid? Read more
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
a human-friendly description of this decode error.
Source§impl Display for StandardDecodeError
impl Display for StandardDecodeError
Source§impl Error for StandardDecodeError
impl Error for StandardDecodeError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl From<ReadError> for StandardDecodeError
impl From<ReadError> for StandardDecodeError
Source§fn from(_: ReadError) -> StandardDecodeError
fn from(_: ReadError) -> StandardDecodeError
Converts to this type from the input type.
Source§impl PartialEq for StandardDecodeError
impl PartialEq for StandardDecodeError
impl Copy for StandardDecodeError
impl Eq for StandardDecodeError
impl StructuralPartialEq for StandardDecodeError
Auto Trait Implementations§
impl Freeze for StandardDecodeError
impl RefUnwindSafe for StandardDecodeError
impl Send for StandardDecodeError
impl Sync for StandardDecodeError
impl Unpin for StandardDecodeError
impl UnwindSafe for StandardDecodeError
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