pub enum ScrollMotion {
Instant,
Smooth,
}Expand description
Whether a WidgetEvent::ScrollIntoView should jump or glide.
Split out from the container’s own smooth_scrolling setting because the
right answer depends on the request, not the container: a caret pinned on
every keystroke must snap (animating it is what produces the “screen
bouncing” typewriter-mode users complain about in other editors), while the
same container gliding for a page-down or a search hit reads as polish.
Variants§
Instant
Jump straight to the target offset.
Smooth
Animate to the target offset, if the container has smooth scrolling
enabled. Containers with smooth_scrolling(false) still jump.
Trait Implementations§
Source§impl Clone for ScrollMotion
impl Clone for ScrollMotion
Source§fn clone(&self) -> ScrollMotion
fn clone(&self) -> ScrollMotion
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 ScrollMotion
Source§impl Debug for ScrollMotion
impl Debug for ScrollMotion
impl Eq for ScrollMotion
Source§impl PartialEq for ScrollMotion
impl PartialEq for ScrollMotion
impl StructuralPartialEq for ScrollMotion
Auto Trait Implementations§
impl Freeze for ScrollMotion
impl RefUnwindSafe for ScrollMotion
impl Send for ScrollMotion
impl Sync for ScrollMotion
impl Unpin for ScrollMotion
impl UnsafeUnpin for ScrollMotion
impl UnwindSafe for ScrollMotion
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