pub struct RemotePointer<T: Sized> { /* private fields */ }Expand description
A safe wrapper around a pointer allocated by COM.
This struct ensures proper cleanup of COM-allocated memory when dropped. It provides methods to access the underlying pointer.
Implementations§
Source§impl<T: Sized> RemotePointer<T>
impl<T: Sized> RemotePointer<T>
pub fn as_mut_ptr(&mut self) -> *mut *mut T
Sourcepub fn as_ref(&self) -> Option<&T>
pub fn as_ref(&self) -> Option<&T>
Returns an Option referencing the inner value if it is not null.
§Safety
The caller must ensure that the inner pointer is valid for reads.
pub fn ok(&self) -> Result<&T>
pub fn from_option<R: Into<RemotePointer<T>>>(value: Option<R>) -> Self
Source§impl RemotePointer<u16>
impl RemotePointer<u16>
Sourcepub fn as_mut_pwstr_ptr(&mut self) -> *mut PWSTR
pub fn as_mut_pwstr_ptr(&mut self) -> *mut PWSTR
Returns a mutable pointer to a PWSTR.
Trait Implementations§
Source§impl<T: Clone + Sized> Clone for RemotePointer<T>
impl<T: Clone + Sized> Clone for RemotePointer<T>
Source§fn clone(&self) -> RemotePointer<T>
fn clone(&self) -> RemotePointer<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Sized> Default for RemotePointer<T>
impl<T: Sized> Default for RemotePointer<T>
Source§impl<T: Sized> Drop for RemotePointer<T>
impl<T: Sized> Drop for RemotePointer<T>
impl<T: Sized> StructuralPartialEq for RemotePointer<T>
Auto Trait Implementations§
impl<T> Freeze for RemotePointer<T>
impl<T> RefUnwindSafe for RemotePointer<T>where
T: RefUnwindSafe,
impl<T> !Send for RemotePointer<T>
impl<T> !Sync for RemotePointer<T>
impl<T> Unpin for RemotePointer<T>
impl<T> UnwindSafe for RemotePointer<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