pub struct SafeHWND<'w> { /* private fields */ }
Expand description
A safer/sounder alternative to HWND
Implementations
Assert that hwnd
is safe for the duration of the resulting SafeHWND
’s lifetime.
To encourage limited lifetimes, this takes hwnd
by reference.
⚠️ Safety ⚠️
By using this method, you assert that hwnd
will be valid for the entire duration of Self
.
This is enforced by assert!(...)
upon construction and drop, but that’s potentially after undefined behavior has been invoked.