pub struct VisibleGridRange {
pub start_row: usize,
pub end_row: usize,
pub render_start_row: usize,
pub render_end_row: usize,
pub columns: usize,
pub offset: f32,
}Expand description
Visible grid range
Fields§
§start_row: usizeFirst visible row
end_row: usizeLast visible row (exclusive)
render_start_row: usizeFirst row to render (including overscan)
render_end_row: usizeLast row to render (exclusive, including overscan)
columns: usizeNumber of columns
offset: f32Y offset for first rendered row
Implementations§
Source§impl VisibleGridRange
impl VisibleGridRange
Sourcepub fn cells_to_render(&self, total_items: usize) -> Vec<GridCell>
pub fn cells_to_render(&self, total_items: usize) -> Vec<GridCell>
Get all cells that should be rendered
Sourcepub fn should_render_cell(&self, row: usize, col: usize) -> bool
pub fn should_render_cell(&self, row: usize, col: usize) -> bool
Check if a cell should be rendered
Trait Implementations§
Source§impl Clone for VisibleGridRange
impl Clone for VisibleGridRange
Source§fn clone(&self) -> VisibleGridRange
fn clone(&self) -> VisibleGridRange
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 Debug for VisibleGridRange
impl Debug for VisibleGridRange
Source§impl PartialEq for VisibleGridRange
impl PartialEq for VisibleGridRange
impl StructuralPartialEq for VisibleGridRange
Auto Trait Implementations§
impl Freeze for VisibleGridRange
impl RefUnwindSafe for VisibleGridRange
impl Send for VisibleGridRange
impl Sync for VisibleGridRange
impl Unpin for VisibleGridRange
impl UnwindSafe for VisibleGridRange
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> 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