Struct detour::StaticDetour
[−]
[src]
pub struct StaticDetour<T: Function>(_);
A type-safe static detour.
It can only be created using StaticDetourController::initialize.
When this object has been dropped, the detour is freed and the controller can
be initialized once again.
It dereferences to GenericDetour
so it provides the same functions that it
(and Detour
) provides.
Beyond this it also provides a set_detour
method, enabling the detour to be
changed whilst hooked.
To see an example view the macro's page.
Methods
impl<T: Function> StaticDetour<T>
[src]
fn set_detour<C>(&mut self, closure: C) where
C: Fn<T::Arguments, Output = T::Output> + Send + 'static,
C: Fn<T::Arguments, Output = T::Output> + Send + 'static,
Changes the detour, regardless of whether the target is hooked or not.
Methods from Deref<Target = GenericDetour<T>>
Trait Implementations
impl<T: Function> Drop for StaticDetour<T>
[src]
fn drop(&mut self)
Removes the detour and frees the controller for new initializations.
impl<T: Function> Deref for StaticDetour<T>
[src]
type Target = GenericDetour<T>
The resulting type after dereferencing
fn deref(&self) -> &GenericDetour<T>
The method called to dereference a value
impl<T: Function> DerefMut for StaticDetour<T>
[src]
fn deref_mut(&mut self) -> &mut GenericDetour<T>
The method called to mutably dereference a value