dyn_cast_ref

Function dyn_cast_ref 

Source
pub fn dyn_cast_ref<T: SupportsInterfaces + ?Sized, DynInterface>(
    x: &T,
) -> Option<&DynInterface>
where DynInterface: Pointee<Metadata = DynMetadata<DynInterface>> + ?Sized + 'static,
Expand description

Runtime-checking safe cast for shared references.