Trait BackgroundView

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

Source

fn background_node(&mut self) -> &mut BackgroundStyle

Returns a mutable reference to the current background style

Provided Methods§

Source

fn background_color(self, color: impl Into<Color>) -> Self

Sets a solid color as the background

Source

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.

Implementors§