pub struct LazyListScrollPosition { /* private fields */ }Expand description
Contains the current scroll position represented by the first visible item index and the first visible item scroll offset.
This is a Copy type that holds reactive state. Reading index or scroll_offset
during composition creates a snapshot dependency for automatic recomposition.
Matches Jetpack Compose’s LazyListScrollPosition design.
Implementations§
Source§impl LazyListScrollPosition
impl LazyListScrollPosition
Sourcepub fn scroll_offset(&self) -> f32
pub fn scroll_offset(&self) -> f32
Returns the scroll offset of the first visible item (reactive read).
Sourcepub fn nearest_range(&self) -> Range<usize>
pub fn nearest_range(&self) -> Range<usize>
Returns the nearest range for optimized key lookups.
Trait Implementations§
Source§impl Clone for LazyListScrollPosition
impl Clone for LazyListScrollPosition
Source§fn clone(&self) -> LazyListScrollPosition
fn clone(&self) -> LazyListScrollPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LazyListScrollPosition
Auto Trait Implementations§
impl Freeze for LazyListScrollPosition
impl RefUnwindSafe for LazyListScrollPosition
impl Send for LazyListScrollPosition
impl Sync for LazyListScrollPosition
impl Unpin for LazyListScrollPosition
impl UnsafeUnpin for LazyListScrollPosition
impl UnwindSafe for LazyListScrollPosition
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