pub trait Hook {
    type This: ThisParameter;
    type Parameters: Parameters;
    type Return: Return;

    const NAMESPACE: &'static str;
    const CLASS_NAME: &'static str;
    const METHOD_NAME: &'static str;

    fn install(&self) -> Result<(), HookInstallError>;
    fn hook(&self) -> *const ();
    fn original(&self) -> Option<*const ()>;
}
Expand description

Trait implemented by all hooks to facilitate generic programming

Required Associated Types

Type of this for the hooked method

Type of the parameters for the hooked method

Type of the return for the hooked method

Required Associated Constants

Namespace of the hooked method’s class

Name of the hooked method’s class

Name of the hooked method

Required Methods

Installs the hook

Pointer to the hook function

Pointer to the hooked method, if installed

Implementors