pub struct TableStates {
pub list_index: usize,
pub list_len: usize,
}
Fields§
§list_index: usize
§list_len: usize
Implementations§
Source§impl TableStates
impl TableStates
Sourcepub fn set_list_len(&mut self, len: usize)
pub fn set_list_len(&mut self, len: usize)
§set_list_len
Set list length
Sourcepub fn incr_list_index(&mut self, rewind: bool)
pub fn incr_list_index(&mut self, rewind: bool)
§incr_list_index
Incremenet list index
Sourcepub fn decr_list_index(&mut self, rewind: bool)
pub fn decr_list_index(&mut self, rewind: bool)
§decr_list_index
Decrement list index
Sourcepub fn fix_list_index(&mut self)
pub fn fix_list_index(&mut self)
§fix_list_index
Keep index if possible, otherwise set to lenght - 1
Sourcepub fn list_index_at_first(&mut self)
pub fn list_index_at_first(&mut self)
§list_index_at_first
Set list index to the first item in the list
Sourcepub fn list_index_at_last(&mut self)
pub fn list_index_at_last(&mut self)
§list_index_at_last
Set list index at the last item of the list
Sourcepub fn calc_max_step_ahead(&self, max: usize) -> usize
pub fn calc_max_step_ahead(&self, max: usize) -> usize
§calc_max_step_ahead
Calculate the max step ahead to scroll list
Sourcepub fn calc_max_step_behind(&self, max: usize) -> usize
pub fn calc_max_step_behind(&self, max: usize) -> usize
§calc_max_step_ahead
Calculate the max step ahead to scroll list
Trait Implementations§
Source§impl Default for TableStates
impl Default for TableStates
Source§fn default() -> TableStates
fn default() -> TableStates
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TableStates
impl RefUnwindSafe for TableStates
impl Send for TableStates
impl Sync for TableStates
impl Unpin for TableStates
impl UnwindSafe for TableStates
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> 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