pub struct VisibleRange {
pub start: usize,
pub end: usize,
pub render_start: usize,
pub render_end: usize,
pub offset: f32,
}Expand description
Visible range information
Fields§
§start: usizeFirst visible item index
end: usizeLast visible item index (exclusive)
render_start: usizeFirst item to render (including overscan)
render_end: usizeLast item to render (exclusive, including overscan)
offset: f32Offset for the first rendered item
Implementations§
Source§impl VisibleRange
impl VisibleRange
Sourcepub fn visible_range(&self) -> Range<usize>
pub fn visible_range(&self) -> Range<usize>
Get range of visible items
Sourcepub fn render_range(&self) -> Range<usize>
pub fn render_range(&self) -> Range<usize>
Get range of items to render
Sourcepub fn is_visible(&self, index: usize) -> bool
pub fn is_visible(&self, index: usize) -> bool
Check if index is visible
Sourcepub fn should_render(&self, index: usize) -> bool
pub fn should_render(&self, index: usize) -> bool
Check if index should be rendered
Sourcepub fn visible_count(&self) -> usize
pub fn visible_count(&self) -> usize
Number of visible items
Sourcepub fn render_count(&self) -> usize
pub fn render_count(&self) -> usize
Number of items to render
Trait Implementations§
Source§impl Clone for VisibleRange
impl Clone for VisibleRange
Source§fn clone(&self) -> VisibleRange
fn clone(&self) -> VisibleRange
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 VisibleRange
impl Debug for VisibleRange
Source§impl PartialEq for VisibleRange
impl PartialEq for VisibleRange
impl StructuralPartialEq for VisibleRange
Auto Trait Implementations§
impl Freeze for VisibleRange
impl RefUnwindSafe for VisibleRange
impl Send for VisibleRange
impl Sync for VisibleRange
impl Unpin for VisibleRange
impl UnwindSafe for VisibleRange
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