pub enum DisplayStrategy {
Virtualization,
InfiniteScroll,
Pagination {
row_count: usize,
controller: PaginationController,
},
}
Expand description
The display acceleration strategy. Defaults to Virtualization
.
Variants§
Virtualization
Only visible rows (plus some extra) will be displayed but the scrollbar will seem as if all rows are there.
If the data provider doesn’t know how many rows there are (i.e. [TableDataProvider::row_count
]
returns None
), this will be the same as InfiniteScroll
.
InfiniteScroll
Only the amount of rows specified is shown. Once the user scrolls down, more rows will be loaded. The scrollbar handle will shrink progressively as more and more rows are loaded.
Pagination
Only the amount of rows specified is shown at a time. You can use the
controller
to manipulate which page of rows is shown.
Scrolling will have no effect on what rows are loaded.
Please note that this will work wether your data source implements [
PaginatedTableDataProvider
] or [TableDataProvider
] directly. Alsorow_count
can be different fromPaginatedTableDataProvider::PAGE_ROW_COUNT
.
Trait Implementations§
Source§impl Clone for DisplayStrategy
impl Clone for DisplayStrategy
Source§fn clone(&self) -> DisplayStrategy
fn clone(&self) -> DisplayStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for DisplayStrategy
impl Default for DisplayStrategy
Source§fn default() -> DisplayStrategy
fn default() -> DisplayStrategy
impl Copy for DisplayStrategy
Auto Trait Implementations§
impl Freeze for DisplayStrategy
impl RefUnwindSafe for DisplayStrategy
impl Send for DisplayStrategy
impl Sync for DisplayStrategy
impl Unpin for DisplayStrategy
impl UnwindSafe for DisplayStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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