pub struct Model {Show 16 fields
pub ceremony_name: Option<String>,
pub ceremony_description: Option<String>,
pub ceremony_materials: Vec<MaterialOverview>,
pub ceremony_step_count: Option<usize>,
pub system_info: Option<SystemInfo>,
pub environment: Option<Environment>,
pub screen: Screen,
pub return_to: Option<Screen>,
pub current_step: Option<StepView>,
pub log: VecDeque<LogLine>,
pub deviations: Vec<DeviationView>,
pub pending_prompt: Option<PendingPrompt>,
pub running: RunningState,
pub tick: u64,
pub now: DateTime<Local>,
pub log_scroll: usize,
/* private fields */
}Expand description
Top-level UI state. A single Screen discriminant captures what
the user is looking at, so the borrow checker enforces that we can’t
render two contradictory views.
Fields§
§ceremony_name: Option<String>Ceremony name, as soon as CeremonyStarted arrives.
ceremony_description: Option<String>Ceremony description, as authored in the DSL.
ceremony_materials: Vec<MaterialOverview>Declared materials. Populated from CeremonyStarted.
ceremony_step_count: Option<usize>Total number of steps in the execution plan, when known.
system_info: Option<SystemInfo>Static build/host identity for the System tab. Populated from
UiSignal::SystemInfo, emitted once at ceremony start.
environment: Option<Environment>Live device environment for the System tab. Populated from
UiSignal::Environment; replaced wholesale on each re-emission.
screen: ScreenCurrent screen.
return_to: Option<Screen>Screen to restore when a modal is dismissed. None when the
current screen is itself the underlying step screen.
current_step: Option<StepView>Most-recent step being executed, if any.
log: VecDeque<LogLine>Bounded log feed.
deviations: Vec<DeviationView>Deviations recorded so far.
pending_prompt: Option<PendingPrompt>Pending prompt the runtime is awaiting an answer to.
running: RunningStateLifecycle phase.
tick: u64Frame counter for spinner animation. Advances on every Tick.
now: DateTime<Local>Wall-clock snapshot, refreshed on every Tick. Rendered in the
header bar; kept in the model so view stays pure and snapshot
tests can pin a deterministic time.
log_scroll: usizeLog-tab scroll offset, counted in lines up from the tail.
0 = following the tail; positive = scrolled into history.
Clamped to log.len() whenever the feed is pushed or evicted.
Implementations§
Source§impl Model
impl Model
Sourcepub fn has_active_spinner(&self) -> bool
pub fn has_active_spinner(&self) -> bool
Whether the log feed currently ends with an active spinner that
must keep animating. Invariant: push_log converts any prior
trailing Icon::Spinner to a Checkmark, so at most the tail
entry can be an active spinner.
Sourcepub fn clock_display_key(&self) -> (u32, u32)
pub fn clock_display_key(&self) -> (u32, u32)
Equivalence key for the visible header clock. The colon blinks on second parity and the minute is the smallest displayed unit, so the rendered header changes iff this key changes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more