pub enum ScrollTarget {
Start,
End,
Offset(f32),
}Expand description
One axis of a ScrollTo: an offset, or an end named rather than measured.
End exists because the number it stands for is not knowable where the request is
written: update has the state, and the largest offset a region may rest at is a
fact about a layout that has not happened yet. Naming the end and letting the frame
resolve it is the difference between “the bottom” and a number that was the bottom
one frame ago.
Variants§
Start
Offset 0 — the end the axis starts at. On a reversed list that is the end it opened at, which is the point of reversing it.
End
As far as the content goes.
Offset(f32)
This offset exactly, clamped to what the content actually has.
Implementations§
Trait Implementations§
Source§impl Clone for ScrollTarget
impl Clone for ScrollTarget
impl Copy for ScrollTarget
Source§impl Debug for ScrollTarget
impl Debug for ScrollTarget
Source§impl PartialEq for ScrollTarget
impl PartialEq for ScrollTarget
impl StructuralPartialEq for ScrollTarget
Auto Trait Implementations§
impl Freeze for ScrollTarget
impl RefUnwindSafe for ScrollTarget
impl Send for ScrollTarget
impl Sync for ScrollTarget
impl Unpin for ScrollTarget
impl UnsafeUnpin for ScrollTarget
impl UnwindSafe for ScrollTarget
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