pub enum ArchError {
Unsupported {
arch: &'static str,
operation: &'static str,
},
Assemble(String),
OutOfRange(String),
UnknownArch {
arch: Option<String>,
e_machine: Option<u64>,
},
Other(String),
}Expand description
Errors raised by ArchCodec implementations.
Unsupported is the soft-fail signal — it means “this arch
doesn’t model this operation, please fall back to pinned
bytes.” Other variants are hard failures the caller surfaces to
the user.
Variants§
Unsupported
Returned when an arch is asked to encode something its codec doesn’t model. The caller (decompile-time byte-drop pass, compile-time lower path) treats this as “leave the pinned bytes alone.”
Assemble(String)
The text the codec was asked to assemble didn’t parse.
OutOfRange(String)
An operand (typically a jump/call displacement) didn’t fit the arch’s encoding range.
UnknownArch
No registered codec factory claimed this arch.
Other(String)
Catch-all for arch-specific encoder failures that don’t fit the structured variants. Use sparingly.
Trait Implementations§
Source§impl Error for ArchError
impl Error for ArchError
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()
Auto Trait Implementations§
impl Freeze for ArchError
impl RefUnwindSafe for ArchError
impl Send for ArchError
impl Sync for ArchError
impl Unpin for ArchError
impl UnsafeUnpin for ArchError
impl UnwindSafe for ArchError
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