pub trait WidgetChildExt {
// Required method
fn set_child(&mut self, child: impl Widget + 'static);
// Provided method
fn with_child(self, child: impl Widget + 'static) -> Self
where Self: Sized { ... }
}Expand description
An extension trait for widgets with a single child widget.
Required Methods§
Provided Methods§
Sourcefn with_child(self, child: impl Widget + 'static) -> Selfwhere
Self: Sized,
fn with_child(self, child: impl Widget + 'static) -> Selfwhere
Self: Sized,
Sets the child widget of the widget and returns self.
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.