pub struct AppState {
pub data: ShowData,
pub scroll_offset: usize,
pub selected_region: Option<usize>,
pub panel_expanded: bool,
pub panel_scroll: usize,
pub show_help: bool,
}Expand description
TUI application state.
Fields§
§data: ShowData§scroll_offset: usize§selected_region: Option<usize>§panel_expanded: bool§panel_scroll: usize§show_help: boolImplementations§
Source§impl AppState
impl AppState
pub fn new(data: ShowData) -> Self
pub fn total_lines(&self) -> usize
Sourcepub fn next_region(&mut self)
pub fn next_region(&mut self)
Jump to the next annotated region.
Sourcepub fn prev_region(&mut self)
pub fn prev_region(&mut self)
Jump to the previous annotated region.
Auto Trait Implementations§
impl Freeze for AppState
impl RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnwindSafe for AppState
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
Mutably borrows from an owned value. Read more
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>
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 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>
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