pub struct ScrollPhysicsState {
pub input_queue: ScrollInputQueue,
pub node_velocities: BTreeMap<(DomId, NodeId), NodeScrollPhysics>,
pub pending_positions: BTreeMap<(DomId, NodeId), LogicalPosition>,
pub scroll_physics: ScrollPhysics,
}Expand description
State stored in the timer’s RefAny data.
Contains the shared input queue, per-node velocity state, and the global
scroll physics configuration from SystemStyle.
Fields§
§input_queue: ScrollInputQueueShared input queue — same Arc as ScrollManager.scroll_input_queue
node_velocities: BTreeMap<(DomId, NodeId), NodeScrollPhysics>Per-node velocity tracking
pending_positions: BTreeMap<(DomId, NodeId), LogicalPosition>Per-node “forced position” from trackpad or programmatic scroll
scroll_physics: ScrollPhysicsGlobal scroll physics configuration (from SystemStyle)
Implementations§
Source§impl ScrollPhysicsState
impl ScrollPhysicsState
Sourcepub fn new(input_queue: ScrollInputQueue, scroll_physics: ScrollPhysics) -> Self
pub fn new(input_queue: ScrollInputQueue, scroll_physics: ScrollPhysics) -> Self
Create a new physics state with the shared input queue and global config
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScrollPhysicsState
impl RefUnwindSafe for ScrollPhysicsState
impl Send for ScrollPhysicsState
impl Sync for ScrollPhysicsState
impl Unpin for ScrollPhysicsState
impl UnsafeUnpin for ScrollPhysicsState
impl UnwindSafe for ScrollPhysicsState
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> 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