ComInterface

Trait ComInterface 

Source
pub trait ComInterface {
    type TSelf: ?Sized;

    // Required methods
    fn iid(ts: TypeSystemName) -> Option<&'static IID>;
    fn iid_ts<TS: TypeSystem>() -> &'static IID
       where Self: ComInterfaceVariant<TS>;
    fn deref(com_itf: &ComItf<Self>) -> &Self;
}
Expand description

The ComInterface trait defines the COM interface details for a COM interface trait.

Required Associated Types§

Source

type TSelf: ?Sized

The current interface.

This associated type exists only to provide better error messages. When the ComInterfaceVariant is accessed through this type, the compiler will first report the missing ComInterface implementation if Self is not a COM interface.

Required Methods§

Source

fn iid(ts: TypeSystemName) -> Option<&'static IID>

IID of the COM interface.

Source

fn iid_ts<TS: TypeSystem>() -> &'static IID
where Self: ComInterfaceVariant<TS>,

Source

fn deref(com_itf: &ComItf<Self>) -> &Self

Dereferences a ComItf<T> into a &T.

While in most cases the user crate will implement T for ComItf<T>, this impl exists only in the user crate and cannot be used in generic contexts. For generic ComItf<T> use, Intercom ipmls Deref<Target=T> for ComItf<T> which requires this method.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§