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§
impl Freeze for Hook
impl RefUnwindSafe for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnwindSafe for Hook
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