#[repr(transparent)]pub struct ScrollOffset(pub LogicalPosition);Expand description
A scroll offset, i.e. how far a scroll container’s content has been moved UP/LEFT relative to its scrollport.
Distinct from a position so that “add the scroll” and “add a position” cannot be confused, and so the two very different sums — ancestors-only vs self-and-ancestors — are at least visible at the call site.
Tuple Fields§
§0: LogicalPositionImplementations§
Source§impl ScrollOffset
impl ScrollOffset
Sourcepub const fn get(self) -> LogicalPosition
pub const fn get(self) -> LogicalPosition
The raw offset.
Trait Implementations§
Source§impl Clone for ScrollOffset
impl Clone for ScrollOffset
Source§fn clone(&self) -> ScrollOffset
fn clone(&self) -> ScrollOffset
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 moreimpl Copy for ScrollOffset
Source§impl Debug for ScrollOffset
impl Debug for ScrollOffset
Source§impl Default for ScrollOffset
impl Default for ScrollOffset
Source§fn default() -> ScrollOffset
fn default() -> ScrollOffset
Returns the “default value” for a type. Read more
impl Eq for ScrollOffset
Source§impl Hash for ScrollOffset
impl Hash for ScrollOffset
Source§impl Ord for ScrollOffset
impl Ord for ScrollOffset
Source§fn cmp(&self, other: &ScrollOffset) -> Ordering
fn cmp(&self, other: &ScrollOffset) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ScrollOffset
impl PartialEq for ScrollOffset
Source§impl PartialOrd for ScrollOffset
impl PartialOrd for ScrollOffset
impl StructuralPartialEq for ScrollOffset
Auto Trait Implementations§
impl Freeze for ScrollOffset
impl RefUnwindSafe for ScrollOffset
impl Send for ScrollOffset
impl Sync for ScrollOffset
impl Unpin for ScrollOffset
impl UnsafeUnpin for ScrollOffset
impl UnwindSafe for ScrollOffset
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