Skip to main content

LayerState

Trait LayerState 

pub trait LayerState: Copy + Debug {
    // Required methods
    fn activate(&mut self, layer: u32, style: ActivationStyle);
    fn deactivate(&mut self, layer: u32);
    fn active_layers(&self) -> impl Iterator<Item = u32>;
}
Expand description

Tracks state of active layers.

Required Methods§

fn activate(&mut self, layer: u32, style: ActivationStyle)

Activate the given layer.

fn deactivate(&mut self, layer: u32)

Deactivate the given layer.

fn active_layers(&self) -> impl Iterator<Item = u32>

Get the active layers, from highest active layer to lowest.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<const L: usize> LayerState for [Activity; L]

§

fn activate(&mut self, layer_index: u32, style: ActivationStyle)

§

fn deactivate(&mut self, layer_index: u32)

§

fn active_layers(&self) -> impl Iterator<Item = u32>

Implementors§