pub struct ScrollInfo {
pub offset: f64,
pub max_offset: f64,
pub overscroll: f64,
}Expand description
A scroll observation snapshot handed to ScrollView::on_scroll.
offset is the clamped scroll position in [0, max_offset]; overscroll is
the signed past-edge displacement (negative = pulled past the top, positive =
pulled past the bottom), zero while the surface rests in range. During a
drag past an edge, offset pins at the edge and overscroll carries the
(resisted) pull.
Fields§
§offset: f64The clamped scroll offset in [0, max_offset] (px scrolled down).
max_offset: f64The maximum scroll offset (content − viewport, never negative).
overscroll: f64Signed past-edge displacement: negative past the top, positive past the
bottom, 0.0 while in range.
Trait Implementations§
Source§impl Clone for ScrollInfo
impl Clone for ScrollInfo
impl Copy for ScrollInfo
Source§impl Debug for ScrollInfo
impl Debug for ScrollInfo
Source§impl PartialEq for ScrollInfo
impl PartialEq for ScrollInfo
impl StructuralPartialEq for ScrollInfo
Auto Trait Implementations§
impl Freeze for ScrollInfo
impl RefUnwindSafe for ScrollInfo
impl Send for ScrollInfo
impl Sync for ScrollInfo
impl Unpin for ScrollInfo
impl UnsafeUnpin for ScrollInfo
impl UnwindSafe for ScrollInfo
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.