#[non_exhaustive]pub enum EncodeError {
UnknownMnemonic,
OperandCountMismatch,
OperandCountRange {
min: u8,
max: u8,
got: u8,
},
OperandOutOfRange {
field: &'static str,
value: i64,
width: u8,
signed: bool,
},
ImmediateNotAligned {
field: &'static str,
value: i64,
scale: i64,
},
InvalidOperandKind {
field: &'static str,
expected: &'static str,
got: &'static str,
},
AmbiguousVariant,
NoMatchingVariant,
NoMatchingVariantHint {
hint: NoMatchingHint,
},
}Expand description
Encoder errors.
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.
UnknownMnemonic
The mnemonic is unknown in the spec set.
OperandCountMismatch
The provided operand count does not match any variant for the mnemonic.
OperandCountRange
The provided operand count is outside the valid range for the mnemonic.
Fields
OperandOutOfRange
An operand value does not fit its target field.
Fields
ImmediateNotAligned
Immediate must satisfy a scale/alignment constraint before encoding.
Fields
InvalidOperandKind
Operand kind does not match expected field kind.
Fields
AmbiguousVariant
Multiple variants matched equally.
NoMatchingVariant
No variant matched the provided operands.
NoMatchingVariantHint
No variant matched, with a structured hint.
Fields
§
hint: NoMatchingHintStructured guidance for adjusting operand shape.
Trait Implementations§
Source§impl Clone for EncodeError
impl Clone for EncodeError
Source§fn clone(&self) -> EncodeError
fn clone(&self) -> EncodeError
Returns a duplicate 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 EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
Source§impl PartialEq for EncodeError
impl PartialEq for EncodeError
impl Eq for EncodeError
impl StructuralPartialEq for EncodeError
Auto Trait Implementations§
impl Freeze for EncodeError
impl RefUnwindSafe for EncodeError
impl Send for EncodeError
impl Sync for EncodeError
impl Unpin for EncodeError
impl UnsafeUnpin for EncodeError
impl UnwindSafe for EncodeError
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