pub struct Layout {
    pub state: LayoutState,
    pub shape: LayoutData,
}
Expand description

Associates the state of a layout with its definition. Contains everything necessary to present this layout to the user and to determine its reactions to inputs.

Fields

state: LayoutStateshape: LayoutData

Implementations

Returns index within current view

Returns index within current view too.

Unlatch all latched keys, so that the new view is the one before first press.

Last bool is new latch state. It doesn’t make sense when the result carries UnlatchAll, but let’s not be picky.

Although the state is not defined at the keys (it’s in the relationship between view and action), keys go through the following stages when clicked repeatedly: unlocked+unlatched -> locked+latched -> locked+unlatched -> unlocked+unlatched

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.