[][src]Trait windows::Interface

pub unsafe trait Interface: Sized + Abi {
    type Vtable;

    pub const IID: Guid;
    pub unsafe fn vtable(&self) -> &Self::Vtable { ... }
pub unsafe fn assume_vtable<T: Interface>(&self) -> &T::Vtable { ... }
pub fn cast<T: Interface>(&self) -> Result<T> { ... } }

Provides low-level access to a COM interface.

This trait is automatically used by the generated bindings and should not be used directly.

Associated Types

Loading content...

Associated Constants

pub const IID: Guid[src]

Loading content...

Provided methods

pub unsafe fn vtable(&self) -> &Self::Vtable[src]

Returns the vtable for the current interface.

pub unsafe fn assume_vtable<T: Interface>(&self) -> &T::Vtable[src]

Returns the vtable for an assumed interface. The name comes from Box's assume_init method as it assumes the vtable is implemented by the current interface's vtable (e.g. a parent interface).

pub fn cast<T: Interface>(&self) -> Result<T>[src]

Attempts to cast the current interface to another interface using QueryInterface. The name cast is preferred to query because there is a WinRT method named query but not one named cast.

Loading content...

Implementors

impl Interface for IActivationFactory[src]

type Vtable = IActivationFactory_vtable

impl Interface for IAgileObject[src]

type Vtable = IUnknown_vtable

impl Interface for IUnknown[src]

type Vtable = IUnknown_vtable

impl Interface for Object[src]

type Vtable = Object_vtable

Loading content...