Enum layer_system::Change

source ·
pub enum Change<S, E> {
    Stay,
    Defer,
    Add(Box<dyn Layer<S, E>>),
    Remove,
    Replace(Box<dyn Layer<S, E>>),
    Clear(Box<dyn Layer<S, E>>),
    Close,
}
Expand description

The action, that will be done after handling an event by a layer.

Variants

Stay

Don’t do anything

Defer

Pass the event to the next layer.

Add(Box<dyn Layer<S, E>>)

Add a new layer on top of the current layer.

Remove

Remove the current layer.

Replace(Box<dyn Layer<S, E>>)

Replace the current layer with a new layer.

Clear(Box<dyn Layer<S, E>>)

Clear all layers and replace them with a new layer.

Close

Remove all layers.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.