pub trait WidgetChildrenExt<S: State> {
// Required methods
fn set_children(&mut self, children: Vec<Val<S, impl Widget<S> + 'static>>);
fn add_child<W: Widget<S> + 'static>(&mut self, child: impl Into<Val<S, W>>);
// Provided methods
fn with_children(
self,
children: Vec<Val<S, impl Widget<S> + 'static>>,
) -> Self
where Self: Sized { ... }
fn with_child<W: Widget<S> + 'static>(
self,
child: impl Into<Val<S, W>>,
) -> Self
where Self: Sized { ... }
}Expand description
An extension trait for widgets with multiple child widgets.
Required Methods§
Sourcefn set_children(&mut self, children: Vec<Val<S, impl Widget<S> + 'static>>)
fn set_children(&mut self, children: Vec<Val<S, impl Widget<S> + 'static>>)
Sets the child widgets of the widget.
Provided Methods§
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.