pub enum PatchError {
OutOfRange {
kind: &'static str,
site: u64,
target: u64,
},
Misaligned {
kind: &'static str,
target: u64,
},
BadScale {
kind: &'static str,
target: u64,
scale: u8,
},
}Expand description
Patch errors carry enough context to identify the failing site.
Variants§
OutOfRange
Branch/load displacement does not fit the encoding.
Fields
Misaligned
arm64 targets must be 4-byte aligned for branches.
BadScale
The value is not aligned for the access size encoded at the site.
Trait Implementations§
Source§impl Debug for PatchError
impl Debug for PatchError
Source§impl Display for PatchError
impl Display for PatchError
Source§impl Error for PatchError
impl Error for PatchError
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 PartialEq for PatchError
impl PartialEq for PatchError
Source§fn eq(&self, other: &PatchError) -> bool
fn eq(&self, other: &PatchError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PatchError
impl StructuralPartialEq for PatchError
Auto Trait Implementations§
impl Freeze for PatchError
impl RefUnwindSafe for PatchError
impl Send for PatchError
impl Sync for PatchError
impl Unpin for PatchError
impl UnsafeUnpin for PatchError
impl UnwindSafe for PatchError
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