Struct wmi::safearray::SafeArrayAccessor
source · [−]pub struct SafeArrayAccessor<T> { /* private fields */ }
Implementations
sourceimpl<T> SafeArrayAccessor<T>
impl<T> SafeArrayAccessor<T>
An accessor to SafeArray, which:
- Locks the array so the data can be read.
- Unlocks the array once dropped.
Pointers to a Safe Array can come from different places (like GetNames, WMI property value), which can have different drop behavior (GetNames require the caller to deallocate the array, while a WMI property must be deallocated via VariantClear).
For this reason, we don’t have a struct SafeArray
.
However, accessing the data of the array must be done using a lock, which is the responsibility of this struct.
Trait Implementations
sourceimpl<T: Debug> Debug for SafeArrayAccessor<T>
impl<T: Debug> Debug for SafeArrayAccessor<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for SafeArrayAccessor<T> where
T: RefUnwindSafe,
impl<T> !Send for SafeArrayAccessor<T>
impl<T> !Sync for SafeArrayAccessor<T>
impl<T> Unpin for SafeArrayAccessor<T>
impl<T> UnwindSafe for SafeArrayAccessor<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more