Struct detour::StaticDetour [] [src]

pub struct StaticDetour<T: Function>(_);

A type-safe static detour.

It can only be instantiated using StaticDetourController::initialize.

When this object is dropped, its detour is freed and the controller can be initialized once again. It dereferences to GenericDetour and therefore providing the same interface.

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]

[src]

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]

[src]

Removes the detour and frees the controller for new initializations.

impl<T: Function> Deref for StaticDetour<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: Function> DerefMut for StaticDetour<T>
[src]

[src]

Mutably dereferences the value.

Auto Trait Implementations

impl<T> Send for StaticDetour<T>

impl<T> Sync for StaticDetour<T>