pub struct VirtualTableState {
pub offset: usize,
pub selected: usize,
pub visible_rows: usize,
}
Fields§
§offset: usize
Current offset (first visible row)
selected: usize
Currently selected row (absolute index)
visible_rows: usize
Number of visible rows (calculated during render)
Implementations§
Source§impl VirtualTableState
impl VirtualTableState
pub fn new() -> Self
pub fn select(&mut self, index: usize)
pub fn scroll_up(&mut self, amount: usize)
pub fn scroll_down(&mut self, amount: usize, total_rows: usize)
pub fn page_up(&mut self)
pub fn page_down(&mut self, total_rows: usize)
pub fn goto_top(&mut self)
pub fn goto_bottom(&mut self, total_rows: usize)
Trait Implementations§
Source§impl Clone for VirtualTableState
impl Clone for VirtualTableState
Source§fn clone(&self) -> VirtualTableState
fn clone(&self) -> VirtualTableState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for VirtualTableState
impl Default for VirtualTableState
Source§fn default() -> VirtualTableState
fn default() -> VirtualTableState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VirtualTableState
impl RefUnwindSafe for VirtualTableState
impl Send for VirtualTableState
impl Sync for VirtualTableState
impl Unpin for VirtualTableState
impl UnwindSafe for VirtualTableState
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