pub unsafe trait Interface: Unknown {
    type Vtbl;

    const IID: Guid;

    // Required method
    fn inherits(iid: &Guid) -> bool;
}
Expand description

Implemented by all COM interface types.

§Safety

If a type I implements Interface, it must have the same layout as the pointer type *const I::Vtbl.

If I::inherits(J::IID) returns true, then the layout of J::Vtbl must be a prefix of the layout of I::Vtbl, i.e. a valid pointer to an instance of I::Vtbl must also be valid pointer to an instance of J::Vtbl.

Required Associated Types§

source

type Vtbl

The type of the virtual method table for this interface.

Required Associated Constants§

source

const IID: Guid

A 16-byte unique identifier (Guid) for the COM interface represented by this type.

Required Methods§

source

fn inherits(iid: &Guid) -> bool

Returns true if this interface transitively inherits from the interface identified by iid.

Note that this has safety implications; see the top-level documentation for Interface.

Object Safety§

This trait is not object safe.

Implementors§