pub struct ScrollState {
pub offset: f64,
pub content_height: f64,
pub viewport_height: f64,
pub dragging: bool,
}Expand description
Where the page is scrolled, kept current as it moves (WebView::scroll_state): what a
browser’s chrome reads to slide its bars away while the user scrolls down a page, as Safari
and Chrome do, and back when they scroll up or reach either end.
Fields§
§offset: f64How far the page is scrolled down, in points from its top: 0 at the top. It can go
below 0 or past the end while the platform’s scroll bounces.
content_height: f64The page’s full height, in points.
viewport_height: f64The height of the part of the page the view shows, in points.
dragging: boolThe user’s finger is on the page (a drag, not a fling or a programmatic scroll).
Implementations§
Trait Implementations§
Source§impl Clone for ScrollState
impl Clone for ScrollState
impl Copy for ScrollState
Source§impl Debug for ScrollState
impl Debug for ScrollState
Source§impl Default for ScrollState
impl Default for ScrollState
Source§impl PartialEq for ScrollState
impl PartialEq for ScrollState
impl StructuralPartialEq for ScrollState
Auto Trait Implementations§
impl Forget for ScrollState
impl Freeze for ScrollState
impl Move for ScrollState
impl RefUnwindSafe for ScrollState
impl Send for ScrollState
impl Sync for ScrollState
impl Unpin for ScrollState
impl UnsafeUnpin for ScrollState
impl UnwindSafe for ScrollState
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> 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