[][src]Struct wio::com::ComPtr

#[repr(transparent)]
pub struct ComPtr<T>(_);

Methods

impl<T> ComPtr<T>[src]

pub unsafe fn from_raw(ptr: *mut T) -> ComPtr<T> where
    T: Interface
[src]

Creates a ComPtr to wrap a raw pointer. It takes ownership over the pointer which means it does not call AddRef. T must be a COM interface that inherits from IUnknown.

pub fn up<U>(self) -> ComPtr<U> where
    T: Deref<Target = U>,
    U: Interface
[src]

Casts up the inheritance chain

pub fn into_raw(self) -> *mut T[src]

Extracts the raw pointer. You are now responsible for releasing it yourself.

pub fn cast<U>(&self) -> Result<ComPtr<U>, i32> where
    U: Interface
[src]

Performs QueryInterface fun.

pub fn as_raw(&self) -> *mut T[src]

Obtains the raw pointer without transferring ownership. Do not release this pointer because it is still owned by the ComPtr.

Trait Implementations

impl<T> Drop for ComPtr<T>[src]

impl<T> PartialEq<ComPtr<T>> for ComPtr<T> where
    T: Interface
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<T> Clone for ComPtr<T> where
    T: Interface
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Debug for ComPtr<T>[src]

impl<T> Deref for ComPtr<T>[src]

type Target = T

The resulting type after dereferencing.

Auto Trait Implementations

impl<T> !Send for ComPtr<T>

impl<T> !Sync for ComPtr<T>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]