pub trait ComponentFallbackProvider {
    // Required method
    fn try_provide_fallback(
        &self,
        ctx: &QueryContext<'_>,
        component: ComponentName,
    ) -> ComponentFallbackProviderResult;

    // Provided method
    fn fallback_for(
        &self,
        ctx: &QueryContext<'_>,
        component: ComponentName,
    ) -> Box<dyn Array> { ... }
}
Expand description

Provides fallback values for components, implemented typically by crate::ViewClass and crate::VisualizerSystem.

Fallbacks can be based on arbitrarily complex & context sensitive heuristics.

Required Methods§

source

fn try_provide_fallback( &self, ctx: &QueryContext<'_>, component: ComponentName, ) -> ComponentFallbackProviderResult

Tries to provide a fallback value for a given component.

If the provider can’t handle the component or simply want to use a placeholder value, it should return ComponentFallbackProviderResult::ComponentNotHandled.

Fallbacks can be based on arbitrarily complex & context sensitive heuristics.

Provided Methods§

source

fn fallback_for( &self, ctx: &QueryContext<'_>, component: ComponentName, ) -> Box<dyn Array>

Provides a fallback value for a given component, first trying the provider and then falling back to the placeholder value registered in the viewer context.

Implementations on Foreign Types§

source§

impl ComponentFallbackProvider for BarChartView

source§

impl ComponentFallbackProvider for DataframeView

source§

impl ComponentFallbackProvider for GraphView

source§

impl ComponentFallbackProvider for MapView

source§

impl ComponentFallbackProvider for SpatialView2D

source§

impl ComponentFallbackProvider for SpatialView3D

source§

impl ComponentFallbackProvider for TensorView

source§

impl ComponentFallbackProvider for TimeSeriesView

Implementors§