Struct minus::PagerState
source · [−]pub struct PagerState {
pub line_numbers: LineNumbers,
pub upper_mark: usize,
pub search_mode: SearchMode,
pub rows: usize,
pub cols: usize,
pub prefix_num: String,
/* private fields */
}
Expand description
Holds all information and configuration about the pager during its un time.
This type is exposed so that end-applications can implement the
InputClassifier
trait which requires the PagerState
to be passed
as a parameter
Various fields are made public so that their values can be accessed while implementing the trait.
Fields
line_numbers: LineNumbers
Configuration for line numbers. See LineNumbers
upper_mark: usize
The upper bound of scrolling.
This is useful for keeping track of the range of lines which are currently being displayed on
the terminal.
When rows - 1
is added to the upper_mark
, it gives the lower bound of scroll.
For example if there are 10 rows is a terminal and the data to display has 50 lines in it/
If the upper_mark
is 15, then the first row of the terminal is the 16th line of the data
and last row is the 24th line of the data.
search_mode: SearchMode
Direction of search
See SearchMode
for available options
rows: usize
Available rows in the terminal
cols: usize
Available columns in the terminal
prefix_num: String
This variable helps in scrolling more than one line at a time
It keeps track of all the numbers that have been entered by the user
untill any of j
, k
, G
, Up
or Down
is pressed
Auto Trait Implementations
impl !RefUnwindSafe for PagerState
impl Send for PagerState
impl Sync for PagerState
impl Unpin for PagerState
impl !UnwindSafe for PagerState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more