Trait windows::Interface[][src]

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

    const IID: Guid;
    unsafe fn vtable(&self) -> &Self::Vtable { ... }
unsafe fn assume_vtable<T: Interface>(&self) -> &T::Vtable { ... }
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

const IID: Guid[src]

Loading content...

Provided methods

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

Returns the vtable for the current interface.

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).

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...