pub struct State {
pub rev: u64,
pub places: Vec<Entry>,
pub modes: Vec<ModeEntry>,
}Expand description
The stack: the place path, the active modes, a revision.
Fields§
§rev: u64Incremented by every transition.
places: Vec<Entry>The places from the root’s child to the top.
modes: Vec<ModeEntry>The active modes, at most one per group, in the order they came.
Implementations§
Source§impl State
impl State
Sourcepub fn is_on(&self, frame: &FrameId) -> bool
pub fn is_on(&self, frame: &FrameId) -> bool
Whether a frame is on (a place on the path or an active mode).
Sourcepub fn has_pushed(&self) -> bool
pub fn has_pushed(&self) -> bool
Whether a pushed mode is on (what nav.back pops first).
Sourcepub fn path_key(&self) -> String
pub fn path_key(&self) -> String
The place path as a key: root/demo.album/demo.photo, payloads
included when they are not null (demo.album=3).
Sourcepub fn projection_key(&self) -> String
pub fn projection_key(&self) -> String
The projection’s key: the path, then the active modes by group
(root/demo.album|orientation=demo.culling). A layout change made
in a mode belongs to this key, so leaving the mode reverts it.
Sourcepub fn layout_key(&self, registry: &FrameRegistry) -> String
pub fn layout_key(&self, registry: &FrameRegistry) -> String
The key a layout is kept under: the projection’s key, a place’s
payload left out unless its frame chooses its arrangement from it
(FrameSpec::arrangement_for). Another photo in the darkroom is
the same place for the layout (a panel detached there stays in its
window); a space whose payload picks its arrangement keeps one
layout per payload.
Sourcepub fn when_keys(&self, registry: &FrameRegistry) -> Vec<(String, String)>
pub fn when_keys(&self, registry: &FrameRegistry) -> Vec<(String, String)>
The context keys the stack sets: place, placeDepth,
modePushed, mode.<group> for every group of the registry (empty
when none is on), the keys of the top place and active modes, and
the top place’s payload (payload_keys).