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,
[src]
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]
impl<T: Function> Deref for StaticDetour<T>
[src]
type Target = GenericDetour<T>
The resulting type after dereferencing.
fn deref(&self) -> &GenericDetour<T>
[src]
Dereferences the value.
impl<T: Function> DerefMut for StaticDetour<T>
[src]
fn deref_mut(&mut self) -> &mut GenericDetour<T>
[src]
Mutably dereferences the value.