Struct win_event_hook::WinEventHook
source · pub struct WinEventHook { /* private fields */ }
Expand description
A Windows Event Hook, managed using the SetWinEventHook and UnhookWinEvent Windows API functions.
Implementations§
source§impl WinEventHook
impl WinEventHook
sourcepub fn os_handle(&self) -> &Option<OsHandle>
pub fn os_handle(&self) -> &Option<OsHandle>
Obtains a reference to the os-specific handle of the event hook.
sourcepub fn install<F: EventHandler + 'static>(
config: Config,
handler: F
) -> Result<Self>
pub fn install<F: EventHandler + 'static>( config: Config, handler: F ) -> Result<Self>
Installs a hook, using a given Config
and EventHandler
function.
Note: Config
can be created using the builder pattern, with Config::builder
.
Trait Implementations§
source§impl Debug for WinEventHook
impl Debug for WinEventHook
source§impl Hash for WinEventHook
impl Hash for WinEventHook
source§impl PartialEq for WinEventHook
impl PartialEq for WinEventHook
impl Eq for WinEventHook
Auto Trait Implementations§
impl !RefUnwindSafe for WinEventHook
impl Send for WinEventHook
impl Sync for WinEventHook
impl Unpin for WinEventHook
impl !UnwindSafe for WinEventHook
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