pub struct OwnedHandle { /* private fields */ }Expand description
RAII wrapper for Win32 HANDLE values.
This type supports both owned and borrowed handle semantics using the
close_on_drop flag.
Implementations§
Source§impl OwnedHandle
impl OwnedHandle
Sourcepub fn with_ownership(handle: HANDLE, close_on_drop: bool) -> Self
pub fn with_ownership(handle: HANDLE, close_on_drop: bool) -> Self
Create a handle with explicit ownership behavior.
Sourcepub fn set_close_on_drop(&mut self, close_on_drop: bool)
pub fn set_close_on_drop(&mut self, close_on_drop: bool)
Configure whether this handle closes on drop.
Sourcepub fn close_on_drop(&self) -> bool
pub fn close_on_drop(&self) -> bool
Return whether this handle closes on drop.
Trait Implementations§
Source§impl Debug for OwnedHandle
impl Debug for OwnedHandle
Source§impl Drop for OwnedHandle
impl Drop for OwnedHandle
impl Send for OwnedHandle
impl Sync for OwnedHandle
Auto Trait Implementations§
impl Freeze for OwnedHandle
impl RefUnwindSafe for OwnedHandle
impl Unpin for OwnedHandle
impl UnsafeUnpin for OwnedHandle
impl UnwindSafe for OwnedHandle
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