WidgetChildExt

Trait WidgetChildExt 

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

Source

fn set_child(&mut self, child: impl Widget + 'static)

Sets the child widget of the widget.

Provided Methods§

Source

fn with_child(self, child: impl Widget + 'static) -> 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§