Struct hexchat_api::Hook
source · pub struct Hook { /* private fields */ }
Expand description
A wrapper for Hexchat callback hooks. These hooks are returned when
registering callbacks and can be used to unregister (unhook) them.
Hook
s can be cloned to share a reference to the same callback hook.
Implementations§
source§impl Hook
impl Hook
sourcepub fn unhook(&self) -> UserData
pub fn unhook(&self) -> UserData
Unhooks the related callback from Hexchat. The user_data object is
returned. Subsequent calls to unhook()
will return None
. The
callback that was registered with Hexchat will be unhooked and dropped.
Ownership of the user_data
will be passed to the caller.
Returns
- The user data that was registered with the callback using one of the hexchat hook functions.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more