Trait cushy::styles::ContextFreeComponent

source ·
pub trait ContextFreeComponent: ComponentDefinition {
    // Required method
    fn default(&self) -> Self::ComponentType;

    // Provided methods
    fn probe(self) -> ComponentProbe<Self> { ... }
    fn probe_wrapping(self, child: impl MakeWidget) -> ComponentProbe<Self> { ... }
}
Expand description

A ComponentDefinition that can provide a default value without access to a runtime context.

Required Methods§

source

fn default(&self) -> Self::ComponentType

Returns the default value for this component.

Provided Methods§

source

fn probe(self) -> ComponentProbe<Self>

Returns a new probe that provides access to the runtime value of this component.

source

fn probe_wrapping(self, child: impl MakeWidget) -> ComponentProbe<Self>

Returns a new probe wrapping child that provides access to the runtime value of this component.

Object Safety§

This trait is not object safe.

Implementors§