Struct winsafe::guard::ReleaseDCGuard
source · pub struct ReleaseDCGuard<'a, H>where
H: user_Hwnd,{ /* private fields */ }
Available on crate features
kernel
and user
only.Expand description
Implementations§
source§impl<'a, H> ReleaseDCGuard<'a, H>where
H: user_Hwnd,
impl<'a, H> ReleaseDCGuard<'a, H>where
H: user_Hwnd,
sourcepub fn leak(&mut self) -> HDC
pub fn leak(&mut self) -> HDC
Ejects the underlying handle, leaving a
Handle::INVALID
in its place.
Since the internal handle will be invalidated, the destructor will not run. It’s your responsability to run it, otherwise you’ll cause a resource leak.
Trait Implementations§
source§impl<'a, H> Deref for ReleaseDCGuard<'a, H>where
H: user_Hwnd,
impl<'a, H> Deref for ReleaseDCGuard<'a, H>where
H: user_Hwnd,
source§impl<'a, H> DerefMut for ReleaseDCGuard<'a, H>where
H: user_Hwnd,
impl<'a, H> DerefMut for ReleaseDCGuard<'a, H>where
H: user_Hwnd,
Auto Trait Implementations§
impl<'a, H> RefUnwindSafe for ReleaseDCGuard<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for ReleaseDCGuard<'a, H>where
H: Sync,
impl<'a, H> !Sync for ReleaseDCGuard<'a, H>
impl<'a, H> Unpin for ReleaseDCGuard<'a, H>
impl<'a, H> UnwindSafe for ReleaseDCGuard<'a, H>where
H: RefUnwindSafe,
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