pub enum HookingError {
MemoryError(MemoryError),
AssemblyError(AssemblyError),
NoDestination(String),
InvalidTarget(*const c_void),
InvalidDestination(*const c_void),
NotHooked,
}Expand description
Anything that can go wrong while building, applying, or removing a hook.
Variants§
MemoryError(MemoryError)
A memory operation (allocation, protection, or aliasing) failed.
AssemblyError(AssemblyError)
Assembling a trampoline or relocating overwritten instructions failed.
NoDestination(String)
The destination function given for the named hook was null.
InvalidTarget(*const c_void)
The address to hook could not be used as a hook target.
InvalidDestination(*const c_void)
The destination address could not be used as a hook destination.
NotHooked
An operation that needs an applied hook was run on one that isn’t currently hooked.
Trait Implementations§
Source§impl Debug for HookingError
impl Debug for HookingError
Source§impl Display for HookingError
impl Display for HookingError
Source§impl Error for HookingError
impl Error for HookingError
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 From<AssemblyError> for HookingError
impl From<AssemblyError> for HookingError
Source§fn from(source: AssemblyError) -> Self
fn from(source: AssemblyError) -> Self
Converts to this type from the input type.
Source§impl From<MemoryError> for HookingError
impl From<MemoryError> for HookingError
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Send for HookingError
impl !Sync for HookingError
impl Forget for HookingError
impl Freeze for HookingError
impl Move for HookingError
impl RefUnwindSafe for HookingErrorwhere
String: RefUnwindSafe,
impl Unpin for HookingError
impl UnsafeUnpin for HookingErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const c_void: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
impl UnwindSafe for HookingErrorwhere
RawVecInner: UnwindSafe,
*const c_void: UnwindSafe,
&'static str: UnwindSafe,
String: UnwindSafe,
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