Trait WidgetChildExt

Source
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§

Source

fn set_child(&mut self, child: impl Into<Val<S, W>>)

Sets the child widget of the widget.

Provided Methods§

Source

fn with_child(self, child: impl Into<Val<S, W>>) -> Self
where 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.

Implementors§

Source§

impl<S: State, W: Widget<S>> WidgetChildExt<S, W> for Button<S, W>