#[repr(C)]pub struct ScrollResult {
pub scrolled_nodes: usize,
pub remaining_delta: LogicalPosition,
pub hit_scrollbar: bool,
}Expand description
Result of dispatching a scroll delta into the system scroll-handling pipeline.
Returned by process_system_scroll. Higher layers can use the
ScrollResult::remaining_delta to forward un-consumed scroll to a parent
container, and ScrollResult::hit_scrollbar to distinguish scrollbar-drag
scrolling from wheel-on-content scrolling for hit-testing purposes.
Fields§
§scrolled_nodes: usizeNumber of scrollable nodes whose offset was updated by this dispatch.
remaining_delta: LogicalPositionDelta that could not be consumed (overscroll). May be forwarded to a parent.
hit_scrollbar: booltrue if the dispatch hit a native scrollbar (drag), false for wheel/touch.
Trait Implementations§
Source§impl Clone for ScrollResult
impl Clone for ScrollResult
Source§fn clone(&self) -> ScrollResult
fn clone(&self) -> ScrollResult
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 moreSource§impl Debug for ScrollResult
impl Debug for ScrollResult
Source§impl Default for ScrollResult
impl Default for ScrollResult
Source§fn default() -> ScrollResult
fn default() -> ScrollResult
Returns the “default value” for a type. Read more
Source§impl PartialEq for ScrollResult
impl PartialEq for ScrollResult
Source§fn eq(&self, other: &ScrollResult) -> bool
fn eq(&self, other: &ScrollResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ScrollResult
impl PartialOrd for ScrollResult
impl Copy for ScrollResult
impl StructuralPartialEq for ScrollResult
Auto Trait Implementations§
impl Freeze for ScrollResult
impl RefUnwindSafe for ScrollResult
impl Send for ScrollResult
impl Sync for ScrollResult
impl Unpin for ScrollResult
impl UnsafeUnpin for ScrollResult
impl UnwindSafe for ScrollResult
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