pub trait Widget<C: Context, S = Build> {
type Response;
// Required method
fn build(self, ui: Ui<'_, C, S>) -> Self::Response;
}Expand description
builds part of the ui each frame and returns a response such as whether it was clicked
- by default a widget owns a node it can lay out
state::Insertwidgets add content like text or backgrounds to the node throughUi::insertwithout changing the node itself
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".