pub trait TypedComponentFallbackProvider<C: Component> {
    // Required method
    fn fallback_for(&self, ctx: &QueryContext<'_>) -> C;
}
Expand description

Provides a fallback value for a given component with known type.

Use the crate::impl_component_fallback_provider macro to build a ComponentFallbackProvider out of several strongly typed TypedComponentFallbackProviders.

Required Methods§

source

fn fallback_for(&self, ctx: &QueryContext<'_>) -> C

Implementors§