pub trait BackgroundContainer {
// Required method
fn background_node(&mut self) -> &mut BackgroundStyle;
// Provided methods
fn background_color(self, color: impl Into<Color>) -> Self
where Self: Sized { ... }
fn background_image(self, image: Handle<Image>) -> Self
where Self: Sized { ... }
}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>) -> Selfwhere
Self: Sized,
fn background_color(self, color: impl Into<Color>) -> Selfwhere
Self: Sized,
Sets a solid color as the background
Sourcefn background_image(self, image: Handle<Image>) -> Selfwhere
Self: Sized,
fn background_image(self, image: Handle<Image>) -> Selfwhere
Self: Sized,
Sets an image as the background