Struct wmi::safearray::SafeArrayAccessor
source · pub struct SafeArrayAccessor<'a, T> { /* private fields */ }
Implementations§
source§impl<'a, T> SafeArrayAccessor<'a, T>
impl<'a, T> SafeArrayAccessor<'a, 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§
source§impl<'a, T: Debug> Debug for SafeArrayAccessor<'a, T>
impl<'a, T: Debug> Debug for SafeArrayAccessor<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for SafeArrayAccessor<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for SafeArrayAccessor<'a, T>
impl<'a, T> !Sync for SafeArrayAccessor<'a, T>
impl<'a, T> Unpin for SafeArrayAccessor<'a, T>
impl<'a, T> UnwindSafe for SafeArrayAccessor<'a, T>where
T: 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