Skip to main content

App

Struct App 

Source
pub struct App {
Show 14 fields pub processes: Vec<ProcessInfo>, pub selected: usize, pub buffers: HashMap<String, OutputBuffer>, pub stream_mode: StreamMode, pub paused: bool, pub scroll_offsets: HashMap<String, usize>, pub running: bool, pub stop_all_on_quit: bool, pub input_mode: InputMode, pub filter_buf: String, pub filter: Option<String>, pub visible_height: usize, pub disk_readers: HashMap<String, DiskLogReader>, pub filtered_indices: HashMap<String, FilteredIndex>,
}

Fields§

§processes: Vec<ProcessInfo>§selected: usize§buffers: HashMap<String, OutputBuffer>§stream_mode: StreamMode§paused: bool§scroll_offsets: HashMap<String, usize>§running: bool§stop_all_on_quit: bool§input_mode: InputMode§filter_buf: String

In-progress filter text while the user is typing.

§filter: Option<String>

Active filter applied to output lines. None means no filter.

§visible_height: usize

Cached visible height of the output pane (set during render).

§disk_readers: HashMap<String, DiskLogReader>

Disk-backed log readers for each process.

§filtered_indices: HashMap<String, FilteredIndex>

Cached filtered indices for filtered disk scrollback.

Implementations§

Source§

impl App

Source

pub fn new() -> Self

Source

pub fn update_processes(&mut self, processes: Vec<ProcessInfo>)

Source

pub fn selected_name(&self) -> Option<&str>

Source

pub fn select_next(&mut self)

Source

pub fn select_prev(&mut self)

Source

pub fn cycle_stream_mode(&mut self)

Source

pub fn toggle_pause(&mut self)

Source

pub fn scroll_up_by(&mut self, lines: usize)

Scroll up by the given number of lines. Auto-pauses if not already paused. Clamps to the maximum scrollable range so overshooting the top is impossible.

Source

pub fn scroll_up(&mut self)

Scroll up by half a page.

Source

pub fn scroll_down_by(&mut self, lines: usize)

Scroll down by the given number of lines. If we reach the bottom, unpause.

Source

pub fn scroll_down(&mut self)

Scroll down by half a page.

Source

pub fn scroll_to_top(&mut self)

Source

pub fn scroll_to_bottom(&mut self)

Source

pub fn visible_lines( &mut self, name: &str, visible_height: usize, ) -> Option<Vec<(LineSource, String)>>

Fetch exactly the visible window of lines for rendering.

When a filter is active, uses the FilteredIndex to read matching lines from disk. Returns Some in all cases.

Source

pub fn start_filter(&mut self)

Source

pub fn confirm_filter(&mut self)

Source

pub fn cancel_filter(&mut self)

Source

pub fn clear_filter(&mut self)

Source

pub fn push_output(&mut self, process: &str, stream: Stream, line: &str)

Source

pub fn quit(&mut self)

Source

pub fn quit_and_stop(&mut self)

Source

pub fn running_count(&self) -> usize

Source

pub fn exited_count(&self) -> usize

Source

pub fn failed_count(&self) -> usize

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,