pub trait BackgroundView: View {
// Required method
fn background_node(&mut self) -> &mut BackgroundStyle;
// Provided methods
fn background_color(self, color: impl Into<Color>) -> Self { ... }
fn background_image(self, image: Handle<Image>) -> Self { ... }
}Expand description
Provides background configuration for a UI container
Required Methods§
Sourcefn background_node(&mut self) -> &mut BackgroundStyle
fn background_node(&mut self) -> &mut BackgroundStyle
Returns a mutable reference to the current background style
Provided Methods§
Sourcefn background_color(self, color: impl Into<Color>) -> Self
fn background_color(self, color: impl Into<Color>) -> Self
Sets a solid color as the background
Sourcefn background_image(self, image: Handle<Image>) -> Self
fn background_image(self, image: Handle<Image>) -> Self
Sets an image as the background
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.