Struct com_scrape_types::ComWrapper
source · pub struct ComWrapper<C: Class> { /* private fields */ }
Expand description
A wrapper for constructing a reference-counted COM object from a Rust value.
ComWrapper
represents an owning reference to the COM object, i.e. it will decrement the
object’s reference count when it goes out of scope.
Implementations§
source§impl<C: Class> ComWrapper<C>
impl<C: Class> ComWrapper<C>
sourcepub fn new(data: C) -> ComWrapper<C>where
C: 'static,
C::Interfaces: MakeHeader<C, Self>,
pub fn new(data: C) -> ComWrapper<C>where
C: 'static,
C::Interfaces: MakeHeader<C, Self>,
Allocates memory for an object and its header and places data
into it.
Trait Implementations§
source§impl<C: Class> Clone for ComWrapper<C>
impl<C: Class> Clone for ComWrapper<C>
source§fn clone(&self) -> ComWrapper<C>
fn clone(&self) -> ComWrapper<C>
Returns a copy 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<C: Class> Deref for ComWrapper<C>
impl<C: Class> Deref for ComWrapper<C>
source§impl<C: Class> Wrapper<C> for ComWrapper<C>
impl<C: Class> Wrapper<C> for ComWrapper<C>
source§unsafe fn data_from_header(ptr: *mut Header<C>) -> *mut C
unsafe fn data_from_header(ptr: *mut Header<C>) -> *mut C
Given a pointer to an object’s header, returns a pointer to the object itself.
source§unsafe fn header_from_data(ptr: *mut C) -> *mut Header<C>
unsafe fn header_from_data(ptr: *mut C) -> *mut Header<C>
Given a pointer to an object, returns a pointer to the object’s header.
impl<C> Send for ComWrapper<C>
impl<C> Sync for ComWrapper<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for ComWrapper<C>
impl<C> Unpin for ComWrapper<C>
impl<C> UnwindSafe for ComWrapper<C>
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