pub trait IntoWidgetList: Sized {
// Required method
fn into_widget_list(self) -> Value<WidgetList>;
// Provided methods
fn into_rows(self) -> Stack { ... }
fn into_columns(self) -> Stack { ... }
fn into_layers(self) -> Layers { ... }
fn into_wrap(self) -> Wrap { ... }
fn into_list(self) -> List { ... }
}
Expand description
A type that can be converted to a Value<WidgetList>
.
use cushy::widget::{IntoWidgetList, MakeWidget};
vec!["hello", "label"].into_rows();
vec!["hello", "button"]
.into_iter()
.map(|l| l.into_button())
.into_columns();
Required Methods§
Sourcefn into_widget_list(self) -> Value<WidgetList>
fn into_widget_list(self) -> Value<WidgetList>
Returns this list of widgets as a Value<WidgetList>
.
Provided Methods§
Sourcefn into_columns(self) -> Stack
fn into_columns(self) -> Stack
Returns self
as a horizontal Stack
of columns.
Sourcefn into_layers(self) -> Layers
fn into_layers(self) -> Layers
Returns self
as Layers
, with the widgets being stacked in the Z
direction.
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.