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§
Sourcefn default(&self) -> Self::ComponentType
fn default(&self) -> Self::ComponentType
Returns the default value for this component.
Provided Methods§
Sourcefn probe(self) -> ComponentProbe<Self>
fn probe(self) -> ComponentProbe<Self>
Returns a new probe that provides access to the runtime value of this component.
Sourcefn probe_wrapping(self, child: impl MakeWidget) -> ComponentProbe<Self>
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.