pub unsafe trait Interface: Sized + 'static {
type Vtbl: 'static;
const IID: Guid;
const NAME: &'static str;
// Required method
fn matches_iid(iid: &Guid) -> bool;
// Provided methods
fn as_unknown(&self) -> &IUnknown { ... }
fn as_raw(&self) -> *mut Self { ... }
}Expand description
Implemented (by generated code) for every COM interface type.
§Safety
Self must be #[repr(C)] with a single field: a pointer to
Self::Vtbl, and Self::Vtbl must start with the vtable of the base
interface (ultimately IUnknownVtbl).
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn matches_iid(iid: &Guid) -> bool
fn matches_iid(iid: &Guid) -> bool
true if iid names this interface or one of its bases (including
IUnknown). Both the IDL value and the value materialized by com.h
(see Guid::as_com_h_materialized) are accepted.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".