pub struct App { /* private fields */ }Expand description
TUI state.
Implementations§
Source§impl App
impl App
Sourcepub fn new(states: Vec<RunState>) -> Self
pub fn new(states: Vec<RunState>) -> Self
Build from already-loaded runs. Used by the tests; App::load is what
the binary calls.
Sourcepub fn refresh(&mut self)
pub fn refresh(&mut self)
Re-read the run directory, keeping the cursor on the same run.
Only files whose mtime moved are parsed again: with a few hundred runs on disk, re-parsing all of them every second would be the most expensive thing magi does while sitting idle.
A run that fails to parse does not disappear. Dropping it would make
a row blink out of a live view every time a load failed — and worse, a
permanently unreadable run (a state file from a different schema) would
be invisible here while magi list reports it as unreadable. So the last
good snapshot is kept if there is one, and otherwise the run is counted
and surfaced in the header.
Sourcepub fn scroll_by(&mut self, delta: i32)
pub fn scroll_by(&mut self, delta: i32)
Scroll the report pane, clamped to the range ratatui’s offset accepts.
Sourcepub fn cycle_filter(&mut self)
pub fn cycle_filter(&mut self)
Cycle the filter, keeping the cursor in range.
Sourcepub fn toggle_focus(&mut self)
pub fn toggle_focus(&mut self)
Swap which pane the movement keys drive.
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
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