pub enum AsmError {
Show 18 variants
InvalidPrefix,
InvalidOperand,
InvalidImmediate,
InvalidInstruction,
OutOfMemory,
InvalidState,
TooManyHandles,
InvalidArgument,
InvalidArch,
NoCodeGenerated,
UnboundLabel,
FailedToOpenAnonymousMemory,
TooLarge,
UnalignedPatch,
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.
FailedToOpenAnonymousMemory
TooLarge
UnalignedPatch
A live patch field is not 4-aligned, so no single atomic store can rewrite it.
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
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()