Skip to main content

LayerExt

Trait LayerExt 

pub trait LayerExt: Sized {
    // Required method
    fn get_layer(&mut self) -> &mut Layer;

    // Provided method
    fn layer(self, layer: impl Into<Layer>) -> Self { ... }
}
Expand description

Method for controlling which painting layer an element belongs to.

Required Methods§

fn get_layer(&mut self) -> &mut Layer

Returns a mutable reference to the element’s layer.

Provided Methods§

fn layer(self, layer: impl Into<Layer>) -> Self

Set the painting layer of the element. See Layer.

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§