Skip to main content

Crate re_component_fallbacks

Crate re_component_fallbacks 

Source
Expand description

This crate implements various component fallbacks.

The only entry point is create_component_fallback_registry, which registers all component type, and component identifier fallbacks to a new FallbackProviderRegistry. This should be called by re_viewer on startup.

§Recommendation for where to put fallbacks

Component fallbacks should be registered here if:

  • They’re not the same as the provided_fallback from reflection, i.e the default implementation is already what you want.
  • And they’re used in more than one view.
  • And doesn’t require specific dependencies from views that makes it not possible to add here without adding dependencies.

Otherwise the fallback should be registered in the view class it’s used in, on that view classes’ on_register method.

Functions§

create_component_fallback_registry
Creates a new FallbackProviderRegistry and registers built-in type and archetype field fallbacks.