[−][src]Struct wio::com::ComPtr
Methods
impl<T> ComPtr<T>
[src]
pub unsafe fn from_raw(ptr: *mut T) -> ComPtr<T> where
T: Interface,
[src]
T: Interface,
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]
T: Deref<Target = U>,
U: Interface,
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]
U: Interface,
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]
T: Interface,
fn eq(&self, other: &ComPtr<T>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl<T> Clone for ComPtr<T> where
T: Interface,
[src]
T: Interface,
fn clone(&self) -> Self
[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]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,