Trait reflect_steroids::DynamicTraitExt
source · [−]pub trait DynamicTraitExt: DynamicTrait {
fn get_type_data_for_object<'a>(
pointer: &dyn Reflect,
registry: &'a TypeRegistry
) -> Result<Cow<'a, Self::TypeData>, TypeError> { ... }
}
Expand description
Convenience methods for all DynamicTrait
implementations.
Provided Methods
fn get_type_data_for_object<'a>(
pointer: &dyn Reflect,
registry: &'a TypeRegistry
) -> Result<Cow<'a, Self::TypeData>, TypeError>
fn get_type_data_for_object<'a>(
pointer: &dyn Reflect,
registry: &'a TypeRegistry
) -> Result<Cow<'a, Self::TypeData>, TypeError>
Given a reference to a reflected object and a TypeRegistry
, find the
Self::TypeData
for the object’s type and
this DynamicTrait
.
In essence, this returns a suitable DynamicCaster
for casting
pointer
to this trait object.