Trait cushy::styles::DynamicComponentResolver

source ·
pub trait DynamicComponentResolver:
    Send
    + Sync
    + 'static {
    // Required method
    fn resolve_component(
        &self,
        context: &WidgetContext<'_>,
    ) -> Option<Component>;
}
Expand description

A type that resolves to a Component at runtime.

Required Methods§

source

fn resolve_component(&self, context: &WidgetContext<'_>) -> Option<Component>

Returns the effective component, if one should be applied.

Implementors§

source§

impl<T> DynamicComponentResolver for T
where T: ComponentDefinition + Clone + Send + Sync + 'static,