Struct vst3::ComWrapper
source · pub struct ComWrapper<C>where
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> ComWrapper<C>where
C: Class,
impl<C> ComWrapper<C>where
C: Class,
sourcepub fn new(data: C) -> ComWrapper<C>
pub fn new(data: C) -> ComWrapper<C>
Allocates memory for an object and its header and places data
into it.
Trait Implementations§
source§impl<C> Clone for ComWrapper<C>where
C: Class,
impl<C> Clone for ComWrapper<C>where
C: Class,
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> Deref for ComWrapper<C>where
C: Class,
impl<C> Deref for ComWrapper<C>where
C: Class,
source§impl<C> Wrapper<C> for ComWrapper<C>where
C: Class,
impl<C> Wrapper<C> for ComWrapper<C>where
C: Class,
source§unsafe fn data_from_header(
ptr: *mut <<C as Class>::Interfaces as InterfaceList>::Header
) -> *mut C
unsafe fn data_from_header( ptr: *mut <<C as Class>::Interfaces as InterfaceList>::Header ) -> *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 <<C as Class>::Interfaces as InterfaceList>::Header
unsafe fn header_from_data( ptr: *mut C ) -> *mut <<C as Class>::Interfaces as InterfaceList>::Header
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