pub struct ScrollOffsets { /* private fields */ }Expand description
Per-surface scroll offset map plus generation-safe dense requested_scroll_seq deduplication
and reusable Layer-1 scroll anchor / scratch buffers (0-alloc steady state).
Implementations§
Source§impl ScrollOffsets
impl ScrollOffsets
pub fn get(&self, id: NodeId) -> (f32, f32)
Sourcepub fn iter(&self) -> impl Iterator<Item = (NodeId, (f32, f32))> + '_
pub fn iter(&self) -> impl Iterator<Item = (NodeId, (f32, f32))> + '_
Every tracked (node, (x, y)) offset, in unspecified order.
pub fn contains(&self, id: NodeId) -> bool
pub fn last_requested_seq(&self, id: NodeId) -> u32
Sourcepub fn last_changed(&self) -> &[NodeId]
pub fn last_changed(&self) -> &[NodeId]
Nodes whose effective scroll offset changed during the most recent reconciliation pass.
pub fn set_raw(&mut self, id: NodeId, x: f32, y: f32)
pub fn remove(&mut self, id: NodeId)
pub fn clear(&mut self)
Sourcepub fn visual_shift(&self, store: &NodeStore, id: NodeId) -> (f32, f32)
pub fn visual_shift(&self, store: &NodeStore, id: NodeId) -> (f32, f32)
Clamped visual child shift for id, subtracting any virtualized Scroll::virtual_top_spacer.
Pure clamped (zero synthetic overscroll) so OS-native scroll hosts never receive rubber-band
offsets through NvScrollOffset.
Sourcepub fn visual_shift_with(
store: &NodeStore,
id: NodeId,
sx: f32,
sy: f32,
) -> (f32, f32)
pub fn visual_shift_with( store: &NodeStore, id: NodeId, sx: f32, sy: f32, ) -> (f32, f32)
Self::visual_shift for an offset (sx, sy) already read (e.g. from Self::iter).
Trait Implementations§
Source§impl Clone for ScrollOffsets
impl Clone for ScrollOffsets
Source§impl Debug for ScrollOffsets
impl Debug for ScrollOffsets
Auto Trait Implementations§
impl Forget for ScrollOffsets
impl Freeze for ScrollOffsetswhere
*const u8 is !null: Freeze,
PhantomData<(NodeId, (f32, f32))>: Freeze,
PhantomData<SeqSlot>: Freeze,
PhantomData<ScrollReconcileEntry>: Freeze,
PhantomData<NodeId>: Freeze,
PhantomData<CapturedScrollAnchor>: Freeze,
impl Move for ScrollOffsets
impl RefUnwindSafe for ScrollOffsets
impl Send for ScrollOffsets
impl Sync for ScrollOffsets
impl Unpin for ScrollOffsets
impl UnsafeUnpin for ScrollOffsetswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(NodeId, (f32, f32))>: UnsafeUnpin,
PhantomData<SeqSlot>: UnsafeUnpin,
PhantomData<ScrollReconcileEntry>: UnsafeUnpin,
PhantomData<NodeId>: UnsafeUnpin,
PhantomData<CapturedScrollAnchor>: UnsafeUnpin,
impl UnwindSafe for ScrollOffsets
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