Trait dynamic_cast::SupportsInterfaces
source · pub unsafe trait SupportsInterfaces {
// Required method
fn get_interface_metadata(
&self,
dyn_interface_id: TypeId
) -> Option<BoxedInterfaceMetadata>;
}
Expand description
Provides runtime information about implemented traits.
Safety
An implementer does not allowed to return from
get_interface_metadata
something except None
in all cases, excluding the case
when dyn_interface_id
is a type id of dyn SomeTrait
, and the implementer implements
SomeTrait
. If get_interface_metadata
returns Some(SomeTrait metadata)
, it should return appropriate
correct metadata for self as dyn SomeTrait
thick pointers.