pub trait WidgetExt: Widget + Sized {
// Provided methods
fn padding(self, padding: Padding) -> Padded<Self> { ... }
fn margin(self, margin: Margin) -> Margined<Self> { ... }
fn background(self, background: Color) -> Backgrounded<Self> { ... }
fn border(self, border: Border) -> Bordered<Self> { ... }
fn on_click(
self,
label: impl Into<String>,
callback: impl FnMut() + 'static,
) -> OnClick<Self> { ... }
fn on_hover(
self,
label: impl Into<String>,
callback: impl FnMut(bool) + 'static,
) -> OnHover<Self> { ... }
}Expand description
Provided Methods§
Sourcefn background(self, background: Color) -> Backgrounded<Self>
fn background(self, background: Color) -> Backgrounded<Self>
Wrap with a background Color.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".