pub enum AsmError {
Show 17 variants
InvalidPrefix,
InvalidOperand,
InvalidImmediate,
InvalidInstruction,
OutOfMemory,
InvalidState,
TooManyHandles,
InvalidArgument,
InvalidArch,
NoCodeGenerated,
UnboundLabel,
FailedToOpenAnonymousMemory,
TooLarge,
Link(LinkError),
X86(X86Error),
MissingCpuFeature {
feature: &'static str,
},
UnsupportedInstruction {
reason: &'static str,
},
}Expand description
Error type shared by all backends and the core code-management machinery.
The variant set follows AsmJit’s Error codes where the same failure mode
exists here; detailed context is carried by nested backend and linker
errors such as AsmError::X86 and AsmError::Link.
Variants§
InvalidPrefix
InvalidOperand
InvalidImmediate
InvalidInstruction
OutOfMemory
InvalidState
TooManyHandles
InvalidArgument
InvalidArch
Invalid or incompatible architecture (AsmJit’s kErrorInvalidArch).
NoCodeGenerated
No code was generated (AsmJit’s kErrorNoCodeGenerated), e.g. linking
with no sections.
UnboundLabel
A relocation or defined symbol references a label that was never bound (AsmJit’s unbound-label diagnostics).
FailedToOpenAnonymousMemory
TooLarge
Link(LinkError)
An in-memory image link failed; the nested error identifies the section, symbol, or relocation involved.
X86(X86Error)
MissingCpuFeature
The selected instruction requires a CPU feature disabled by the target.
UnsupportedInstruction
Trait Implementations§
impl Eq for AsmError
Source§impl Error for AsmError
impl Error for AsmError
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 Ord for AsmError
impl Ord for AsmError
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for AsmError
impl PartialOrd for AsmError
impl StructuralPartialEq for AsmError
Auto Trait Implementations§
impl Freeze for AsmError
impl RefUnwindSafe for AsmError
impl Send for AsmError
impl Sync for AsmError
impl Unpin for AsmError
impl UnsafeUnpin for AsmError
impl UnwindSafe for AsmError
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