Enum keystone_engine::ffi::Error
source · #[repr(C)]
pub enum Error {
Show 46 variants
OK,
NOMEM,
ARCH,
HANDLE,
MODE,
VERSION,
OPT_INVALID,
ASM_EXPR_TOKEN,
ASM_DIRECTIVE_VALUE_RANGE,
ASM_DIRECTIVE_ID,
ASM_DIRECTIVE_TOKEN,
ASM_DIRECTIVE_STR,
ASM_DIRECTIVE_COMMA,
ASM_DIRECTIVE_RELOC_NAME,
ASM_DIRECTIVE_RELOC_TOKEN,
ASM_DIRECTIVE_FPOINT,
ASM_DIRECTIVE_UNKNOWN,
ASM_DIRECTIVE_EQU,
ASM_DIRECTIVE_INVALID,
ASM_VARIANT_INVALID,
ASM_EXPR_BRACKET,
ASM_SYMBOL_MODIFIER,
ASM_SYMBOL_REDEFINED,
ASM_SYMBOL_MISSING,
ASM_RPAREN,
ASM_STAT_TOKEN,
ASM_UNSUPPORTED,
ASM_MACRO_TOKEN,
ASM_MACRO_PAREN,
ASM_MACRO_EQU,
ASM_MACRO_ARGS,
ASM_MACRO_LEVELS_EXCEED,
ASM_MACRO_STR,
ASM_MACRO_INVALID,
ASM_ESC_BACKSLASH,
ASM_ESC_OCTAL,
ASM_ESC_SEQUENCE,
ASM_ESC_STR,
ASM_TOKEN_INVALID,
ASM_INSN_UNSUPPORTED,
ASM_FIXUP_INVALID,
ASM_LABEL_INVALID,
ASM_FRAGMENT_INVALID,
ASM_INVALIDOPERAND,
ASM_MISSINGFEATURE,
ASM_MNEMONICFAIL,
}
Expand description
All type of errors encountered by Keystone API.
Variants
OK
No error: everything was fine.
NOMEM
Out-Of-Memory error: ks_open(), ks_emulate().
ARCH
Unsupported architecture: ks_open().
HANDLE
Invalid handle.
MODE
Invalid/unsupported mode: ks_open().
VERSION
Unsupported version (bindings).
OPT_INVALID
Unsupported option.
ASM_EXPR_TOKEN
Unknown token in expression.
ASM_DIRECTIVE_VALUE_RANGE
Literal value out of range for directive.
ASM_DIRECTIVE_ID
Expected identifier in directive.
ASM_DIRECTIVE_TOKEN
Unexpected token in directive.
ASM_DIRECTIVE_STR
Expected string in directive.
ASM_DIRECTIVE_COMMA
Expected comma in directive.
ASM_DIRECTIVE_RELOC_NAME
Expected relocation name in directive.
ASM_DIRECTIVE_RELOC_TOKEN
Unexpected token in .reloc directive.
ASM_DIRECTIVE_FPOINT
Invalid floating point in directive.
ASM_DIRECTIVE_UNKNOWN
Unknown directive.
ASM_DIRECTIVE_EQU
Invalid equal directive.
ASM_DIRECTIVE_INVALID
(Generic) invalid directive.
ASM_VARIANT_INVALID
Invalid variant.
ASM_EXPR_BRACKET
Brackets expression not supported on this target.
ASM_SYMBOL_MODIFIER
Unexpected symbol modifier following ‘@’.
ASM_SYMBOL_REDEFINED
Invalid symbol redefinition.
ASM_SYMBOL_MISSING
Cannot find a symbol.
ASM_RPAREN
Expected ‘)’ in parentheses expression.
ASM_STAT_TOKEN
Unexpected token at start of statement.
ASM_UNSUPPORTED
Unsupported token yet.
ASM_MACRO_TOKEN
Unexpected token in macro instantiation.
ASM_MACRO_PAREN
Unbalanced parentheses in macro argument.
ASM_MACRO_EQU
Expected ‘=’ after formal parameter identifier.
ASM_MACRO_ARGS
Too many positional arguments.
ASM_MACRO_LEVELS_EXCEED
Macros cannot be nested more than 20 levels deep.
ASM_MACRO_STR
Invalid macro string.
ASM_MACRO_INVALID
Invalid macro (generic error).
ASM_ESC_BACKSLASH
Unexpected backslash at end of escaped string.
ASM_ESC_OCTAL
Invalid octal escape sequence (out of range).
ASM_ESC_SEQUENCE
Invalid escape sequence (unrecognized character).
ASM_ESC_STR
Broken escape string.
ASM_TOKEN_INVALID
Invalid token.
ASM_INSN_UNSUPPORTED
This instruction is unsupported in this mode.
ASM_FIXUP_INVALID
Invalid fixup.
ASM_LABEL_INVALID
Invalid label.
ASM_FRAGMENT_INVALID
Invalid fragment.
ASM_INVALIDOPERAND
Generic input assembly errors (invalid operand) - architecture specific.
ASM_MISSINGFEATURE
Generic input assembly errors (missing feature) - architecture specific.
ASM_MNEMONICFAIL
Generic input assembly errors (mnemonic fail) - architecture specific.
Implementations
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl From<Error> for KeystoneError
impl From<Error> for KeystoneError
sourceimpl Ord for Error
impl Ord for Error
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
sourcefn partial_cmp(&self, other: &Error) -> Option<Ordering>
fn partial_cmp(&self, other: &Error) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more