Skip to main content

type_id_vtable

Function type_id_vtable 

Source
pub const fn type_id_vtable(
    _id: TypeId,
    _trait: TypeId,
) -> Option<DynMetadata<*const ()>>
🔬This is a nightly-only experimental API. (core_intrinsics)
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description

Check if a type represented by a TypeId implements a trait represented by a TypeId. It can only be called at compile time, the backends do not implement it. If it implements the trait the dyn metadata gets returned for vtable access.