pub struct HookHandle<'ph, 'f> where
    'f: 'ph, 
{ /* private fields */ }
Expand description

A hook handle.

Likes to get caught on stuff. Unhooks when dropped.

Implementations

If this is a timer hook, returns whether the hook has expired.

Otherwise, returns false.

Examples
use hexchat_unsafe_plugin::{HookHandle};

/// Remove timers that have expired.
fn clean_up_timers(timers: &mut Vec<HookHandle<'_, '_>>) {
    timers.retain(|timer| {
        !timer.expired()
    });
}

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.