pub struct ScrollOffsetMapper {
    pub current_spatial_node: SpatialNodeIndex,
    pub current_offset: LayoutVector2D,
}Expand description
Offsets primitives (and clips) by the external scroll offset supplied to scroll nodes.
Fields§
§current_spatial_node: SpatialNodeIndex§current_offset: LayoutVector2DImplementations§
Source§impl ScrollOffsetMapper
 
impl ScrollOffsetMapper
fn new() -> Self
Sourcefn external_scroll_offset(
    &mut self,
    spatial_node_index: SpatialNodeIndex,
    spatial_tree: &SceneSpatialTree,
) -> LayoutVector2D
 
fn external_scroll_offset( &mut self, spatial_node_index: SpatialNodeIndex, spatial_tree: &SceneSpatialTree, ) -> LayoutVector2D
Return the accumulated external scroll offset for a spatial node. This caches the last result, which is the common case, or defers to the spatial tree to build the value.
Auto Trait Implementations§
impl Freeze for ScrollOffsetMapper
impl RefUnwindSafe for ScrollOffsetMapper
impl Send for ScrollOffsetMapper
impl Sync for ScrollOffsetMapper
impl Unpin for ScrollOffsetMapper
impl UnwindSafe for ScrollOffsetMapper
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