pub struct AppModel {Show 13 fields
pub config: ScanConfig,
pub builder: BuilderUi,
pub fields: Vec<FieldDef>,
pub rows: Vec<ScreenerRow>,
pub status: String,
pub error: Option<String>,
pub view: ViewMode,
pub scroll: usize,
pub ticks: u64,
pub max_columns: usize,
pub watch: bool,
pub watch_interval: Duration,
pub last_scan_at: Instant,
}Expand description
Pane model: config, last rows, status line, active view.
Fields§
§config: ScanConfigScan parameters.
builder: BuilderUiBuilder pane state.
fields: Vec<FieldDef>Fields used for the last scan / table columns.
rows: Vec<ScreenerRow>Last scan rows.
status: StringStatus / branding line (non-error).
error: Option<String>Last error message, if any.
view: ViewModeActive view.
scroll: usizeVertical scroll offset (results rows or text panes).
ticks: u64Refresh counter.
max_columns: usizeMax data columns in the results table.
watch: boolWhen true, auto-refresh on Self::watch_interval.
watch_interval: DurationAuto-refresh period (already floored to MIN_TUI_REFRESH_SECS).
last_scan_at: InstantInstant of the last completed scan attempt (success or failure).
Implementations§
Source§impl AppModel
impl AppModel
Sourcepub fn new(
config: ScanConfig,
fields: Vec<FieldDef>,
rows: Vec<ScreenerRow>,
watch: bool,
watch_interval_secs: f64,
) -> Self
pub fn new( config: ScanConfig, fields: Vec<FieldDef>, rows: Vec<ScreenerRow>, watch: bool, watch_interval_secs: f64, ) -> Self
Builds a model after an initial scan (or empty rows on failure).
Sourcepub fn set_rows(&mut self, fields: Vec<FieldDef>, rows: Vec<ScreenerRow>)
pub fn set_rows(&mut self, fields: Vec<FieldDef>, rows: Vec<ScreenerRow>)
Records a successful scan.
Sourcepub fn set_error(&mut self, message: impl Into<String>)
pub fn set_error(&mut self, message: impl Into<String>)
Records a scan failure (keeps previous rows).
Sourcepub const fn toggle_help(&mut self)
pub const fn toggle_help(&mut self)
Toggles Results ↔ Help.
Sourcepub fn cycle_view(&mut self)
pub fn cycle_view(&mut self)
Cycles Results → Builder → Payload → Codegen.
Sourcepub const fn set_view_number(&mut self, n: u8)
pub const fn set_view_number(&mut self, n: u8)
Jumps to a numbered pane (1–4).
Sourcepub fn toggle_watch(&mut self)
pub fn toggle_watch(&mut self)
Toggles opt-in auto-refresh (off by default).
Sourcepub fn cooldown_secs_remaining(&self) -> u64
pub fn cooldown_secs_remaining(&self) -> u64
Seconds remaining before another scan is allowed (0 when ready).
Sourcepub fn can_refresh(&self) -> bool
pub fn can_refresh(&self) -> bool
Returns true when a manual or watch refresh may run (honors TUI floor).
Sourcepub fn watch_due(&self) -> bool
pub fn watch_due(&self) -> bool
Returns true when watch mode is on and the watch interval has elapsed.
Sourcepub fn builder_focus_by(&mut self, delta: isize)
pub fn builder_focus_by(&mut self, delta: isize)
Moves builder focus up/down.
Sourcepub fn step_asset(&mut self, delta: isize)
pub fn step_asset(&mut self, delta: isize)
Cycles asset when the Asset row is focused.
Sourcepub fn on_asset_changed(&mut self)
pub fn on_asset_changed(&mut self)
Resets config after an asset switch in the builder.
Sourcepub const fn toggle_sort_ascending(&mut self)
pub const fn toggle_sort_ascending(&mut self)
Toggles sort direction when the Sort row is focused.
Sourcepub fn step_preset(&mut self, delta: isize)
pub fn step_preset(&mut self, delta: isize)
Steps the preset picker and updates config.
Sourcepub fn step_limit(&mut self, delta: i32)
pub fn step_limit(&mut self, delta: i32)
Adjusts row limit (minimum 1, maximum 500).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppModel
impl RefUnwindSafe for AppModel
impl Send for AppModel
impl Sync for AppModel
impl Unpin for AppModel
impl UnsafeUnpin for AppModel
impl UnwindSafe for AppModel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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