pub trait IOptionalFeatureProvider {
// Required method
fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>;
}Expand description
Something that can expose optional, backend-specific features by type.
Features are looked up by the TypeId of the feature’s type, which may be
a trait object type (TypeId::of::<dyn IFoo>()); the returned value then
holds an Rc<dyn IFoo>, or an Arc<dyn IFoo> for a feature that is
shared by threads.
Required Methods§
Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".