Struct winsafe::guard::CoUninitializeGuard
source · pub struct CoUninitializeGuard { /* private fields */ }
Available on crate features
kernel
and ole
only.Expand description
RAII implementation which automatically calls
CoUninitialize
when the object goes out of scope.
Implementations§
source§impl CoUninitializeGuard
impl CoUninitializeGuard
sourcepub const unsafe fn new(hr: HRESULT) -> Self
pub const unsafe fn new(hr: HRESULT) -> Self
Constructs the guard by taking ownership of the code.
§Safety
Be sure you need to call
CoUninitialize
at the end of scope.
sourcepub const fn hr(&self) -> HRESULT
pub const fn hr(&self) -> HRESULT
Returns the informational success code returned by
CoInitializeEx
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoUninitializeGuard
impl RefUnwindSafe for CoUninitializeGuard
impl Send for CoUninitializeGuard
impl Sync for CoUninitializeGuard
impl Unpin for CoUninitializeGuard
impl UnwindSafe for CoUninitializeGuard
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