Trait quest_hook::Hook
source · [−]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 This: ThisParameter
type This: ThisParameter
Type of this for the hooked method
type Parameters: Parameters
type Parameters: Parameters
Type of the parameters for the hooked method
Required Associated Constants
const CLASS_NAME: &'static str
const CLASS_NAME: &'static str
Name of the hooked method’s class
const METHOD_NAME: &'static str
const METHOD_NAME: &'static str
Name of the hooked method
Required Methods
fn install(&self) -> Result<(), HookInstallError>
fn install(&self) -> Result<(), HookInstallError>
Installs the hook