pub struct ViewState {Show 14 fields
pub crosshair_row: usize,
pub crosshair_col: usize,
pub scroll_offset: (usize, usize),
pub selection_mode: SelectionMode,
pub selected_cells: Vec<(usize, usize)>,
pub selection_anchor: Option<(usize, usize)>,
pub viewport_lock: bool,
pub cursor_lock: bool,
pub navigation_history: Vec<(usize, usize)>,
pub history_index: usize,
pub viewport_rows: usize,
pub viewport_columns: usize,
pub total_rows: usize,
pub total_columns: usize,
}Expand description
ViewState consolidates all view-related state for a buffer
This is the single source of truth for navigation, selection, and viewport state
Fields§
§crosshair_row: usize§crosshair_col: usize§scroll_offset: (usize, usize)§selection_mode: SelectionMode§selected_cells: Vec<(usize, usize)>§selection_anchor: Option<(usize, usize)>§viewport_lock: bool§cursor_lock: bool§history_index: usize§viewport_rows: usize§viewport_columns: usize§total_rows: usize§total_columns: usizeTrait Implementations§
Auto Trait Implementations§
impl Freeze for ViewState
impl RefUnwindSafe for ViewState
impl Send for ViewState
impl Sync for ViewState
impl Unpin for ViewState
impl UnwindSafe for ViewState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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