Struct winsafe::guard::VersionInfoGuard
source · pub struct VersionInfoGuard { /* private fields */ }
Available on crate features
kernel
and version
only.Expand description
RAII implementation for HVERSIONINFO
which releases
the underlying memory block when the object goes out of scope.
Implementations§
source§impl VersionInfoGuard
impl VersionInfoGuard
sourcepub const unsafe fn new(handle: HVERSIONINFO) -> Self
pub const unsafe fn new(handle: HVERSIONINFO) -> Self
sourcepub fn leak(&mut self) -> HVERSIONINFO
pub fn leak(&mut self) -> HVERSIONINFO
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 memory leak.
Trait Implementations§
source§impl Deref for VersionInfoGuard
impl Deref for VersionInfoGuard
source§impl DerefMut for VersionInfoGuard
impl DerefMut for VersionInfoGuard
Auto Trait Implementations§
impl Freeze for VersionInfoGuard
impl RefUnwindSafe for VersionInfoGuard
impl Send for VersionInfoGuard
impl !Sync for VersionInfoGuard
impl Unpin for VersionInfoGuard
impl UnwindSafe for VersionInfoGuard
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