pub trait WidgetChildExt<S: State, W: Widget<S> + 'static> {
// Required method
fn set_child(&mut self, child: impl Into<Val<S, W>>);
// Provided method
fn with_child(self, child: impl Into<Val<S, W>>) -> 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 Into<Val<S, W>>) -> Selfwhere
Self: Sized,
fn with_child(self, child: impl Into<Val<S, W>>) -> 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.