pub struct App {Show 18 fields
pub selected: usize,
pub filter: String,
pub mode: Mode,
pub status: Option<String>,
pub color: bool,
pub page_rows: usize,
pub tab: Tab,
pub daemon_up: bool,
pub scorer: Option<String>,
pub screen: Screen,
pub splash_frame: usize,
pub vault: Option<SealedVault>,
pub authed: bool,
pub login_input: Zeroizing<String>,
pub login_error: Option<String>,
pub settings: Option<LockedSettings>,
pub settings_selected: usize,
pub settings_status: Option<String>,
/* private fields */
}Expand description
The whole UI state.
Fields§
§selected: usizeSelection index into the filtered view.
filter: StringThe active filter string.
mode: ModeCurrent mode.
status: Option<String>A transient status message (e.g. the result of an undo).
color: boolWhether to use color (respects NO_COLOR).
page_rows: usizeNumber of timeline data-rows visible in the last render, used as the step
for PageUp/PageDown. Set by the renderer each frame; 0 until the first.
tab: TabThe active top-level view.
daemon_up: boolWhether the daemon answered on the last refresh (for the vitals strip).
scorer: Option<String>The active Tier-2 scorer backend id, if the daemon reported one.
screen: ScreenThe current top-level screen (splash → [login] → main).
splash_frame: usizeAnimation frame for the launch splash (advanced by the event loop).
vault: Option<SealedVault>The sealed admin vault, when settings are locked (drives the login gate).
authed: boolWhether the admin password has been entered this session.
login_input: Zeroizing<String>The password being typed on the login screen (never echoed verbatim). Zeroized on drop and on a failed attempt so a wrong guess isn’t left in freed heap.
login_error: Option<String>The last login error, shown under the prompt.
settings: Option<LockedSettings>The decrypted locked settings (populated on entering the Settings screen).
settings_selected: usizeSelection index on the Settings screen.
settings_status: Option<String>Transient result/error line on the Settings screen.
Implementations§
Source§impl App
impl App
pub fn new(color: bool) -> Self
Sourcepub fn settings_editable(&self) -> bool
pub fn settings_editable(&self) -> bool
Whether locked settings can be edited (provisioned + authenticated).
Sourcepub fn open_settings(&mut self)
pub fn open_settings(&mut self)
Open the Settings control panel. Decrypts the live settings when we can; otherwise falls back to defaults shown read-only (unprovisioned host).
Sourcepub fn toggle_selected_setting(&mut self)
pub fn toggle_selected_setting(&mut self)
Toggle the selected setting and re-seal the vault. Read-only when the host isn’t provisioned/authenticated (then it only explains, never pretends).
Sourcepub fn start_on_splash(&mut self)
pub fn start_on_splash(&mut self)
Begin on the animated launch splash (used by run() at startup).
Sourcepub fn set_vault(&mut self, vault: Option<SealedVault>)
pub fn set_vault(&mut self, vault: Option<SealedVault>)
Attach the loaded vault state. A Locked vault gates the app behind the
admin password; Unprovisioned/Degraded leave it open (viewing the
audit log was never password-gated — only changing settings is).
Sourcepub fn needs_login(&self) -> bool
pub fn needs_login(&self) -> bool
Whether the password gate must be shown before the app.
Sourcepub fn submit_login(&mut self)
pub fn submit_login(&mut self)
Submit the typed password. On success, authenticate and enter the app; on failure, clear the field and show an error. The password never appears on the wire or in a log — only a constant-time verify against the vault.
Sourcepub fn tick_splash(&mut self) -> bool
pub fn tick_splash(&mut self) -> bool
Advance the splash animation one tick; once it completes, enter the app. Returns true while the splash is still showing (so the loop keeps the fast animation cadence).
Sourcepub fn vitals(&self) -> (usize, usize, usize)
pub fn vitals(&self) -> (usize, usize, usize)
Counts for the header vitals strip: (total, held, catastrophic) over the full loaded set (not the filtered/tab slice — vitals are global).
Sourcepub fn select_tab(&mut self, tab: Tab)
pub fn select_tab(&mut self, tab: Tab)
Switch to a specific tab, resetting selection to the top of its slice.
Sourcepub fn set_events(&mut self, events: Vec<LoggedEvent>)
pub fn set_events(&mut self, events: Vec<LoggedEvent>)
Replace the event set (from a fresh log read), keeping selection in range.
Sourcepub fn filtered_indices(&self) -> Vec<usize>
pub fn filtered_indices(&self) -> Vec<usize>
Indices into events that match the active tab’s slice AND the current
filter (both must hold — the tab narrows, the filter narrows further).
Sourcepub fn visible(&self) -> Vec<&LoggedEvent>
pub fn visible(&self) -> Vec<&LoggedEvent>
The events currently visible (after filtering), in display order.
Sourcepub fn selected_event(&self) -> Option<&LoggedEvent>
pub fn selected_event(&self) -> Option<&LoggedEvent>
The currently selected event, if any.
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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