hooking 0.8.0

cross platform detour / hooking library in rust
Documentation
use thiserror::Error;

/// Result alias for assembly operations.
pub type Result<T> = std::result::Result<T, AssemblyError>;

/// Something went wrong assembling, disassembling, or relocating code.
#[derive(Debug, Error)]
pub enum AssemblyError {
    /// The underlying encoder or decoder failed.
    #[error("Error during assembly/dissasembly")]
    AssemblyError(#[from] iced_x86::IcedError),

    /// Fewer bytes than needed could be decoded into whole instructions while
    /// relocating the code a hook overwrites.
    #[error("Could not decode enough instructions while trying to relocate")]
    RelocationError,

    /// An instruction was hit that this crate doesn't know how to relocate to
    /// a new address.
    #[error("Relocating instruction {0:?} is not supported")]
    UnsupportedRelocation(iced_x86::Code),
}