PreviewPrototypeSession
struct · ferroui-designer · v0.5.0
struct PreviewPrototypeSession
A bounded navigation cursor over one accepted graph. It owns no source session, controls, timers or application state. Hosts validate native/source authority before activating an interaction and can retain native views across Back.
Members
startflowcurrentscreenoverlaysactive_stageshistorycan_go_backrestartactivate_linkactivatebackclose_overlay
start
fn start(graph: &PreviewPrototype, flow_name: &str) -> Result<Self, String>
The host must first validate graph stage references against its live board. This operation also validates structure so standalone callers cannot install ambiguous interactions, invalid anchors or unbounded descriptors.
flow
fn flow(self: &Self) -> &str
current
fn current(self: &Self) -> PreviewStageId
The only stage that accepts an interaction: the top overlay, or the screen.
screen
fn screen(self: &Self) -> PreviewStageId
The base screen beneath any open overlays. History stores these IDs only.
overlays
fn overlays(self: &Self) -> &[PreviewPrototypeOverlay]
Overlay entries in back-to-front order, excluding the base screen.
active_stages
fn active_stages(self: &Self) -> Vec<PreviewStageId>
Visible native hosts in back-to-front order. Only current() accepts actions.
history
fn history(self: &Self) -> &[PreviewStageId]
can_go_back
fn can_go_back(self: &Self) -> bool
restart
fn restart(self: &mut Self) -> PreviewStageId
Restart navigation; the host decides separately whether native views reset.
activate_link
fn activate_link(self: &mut Self, index: usize) -> Result<PreviewStageId, String>
activate
fn activate(self: &mut Self, link: &PreviewPrototypeLink) -> Result<PreviewStageId, String>
back
fn back(self: &mut Self) -> Result<PreviewStageId, String>
Close the top overlay first; otherwise return through screen history.
close_overlay
fn close_overlay(self: &mut Self) -> Result<PreviewStageId, String>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherSameTreeModelCloneDebugStructuralPartialEqPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.