pub struct ScrollAnimation {
pub points_per_second: f32,
pub duration: Rangef,
}
Expand description
Scroll animation configuration, used when programmatically scrolling somewhere (e.g. with [crate::Ui::scroll_to_cursor]
)
The animation duration is calculated based on the distance to be scrolled via [ScrollAnimation::points_per_second]
and can be clamped to a min / max duration via [ScrollAnimation::duration]
.
Fields§
§points_per_second: f32
With what speed should we scroll? (Default: 1000.0)
duration: Rangef
The min / max scroll duration.
Implementations§
Trait Implementations§
Source§impl Clone for ScrollAnimation
impl Clone for ScrollAnimation
Source§fn clone(&self) -> ScrollAnimation
fn clone(&self) -> ScrollAnimation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScrollAnimation
impl Debug for ScrollAnimation
Source§impl Default for ScrollAnimation
impl Default for ScrollAnimation
Source§impl<'de> Deserialize<'de> for ScrollAnimationwhere
ScrollAnimation: Default,
impl<'de> Deserialize<'de> for ScrollAnimationwhere
ScrollAnimation: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScrollAnimation
impl PartialEq for ScrollAnimation
Source§impl Serialize for ScrollAnimation
impl Serialize for ScrollAnimation
impl Copy for ScrollAnimation
impl StructuralPartialEq for ScrollAnimation
Auto Trait Implementations§
impl Freeze for ScrollAnimation
impl RefUnwindSafe for ScrollAnimation
impl Send for ScrollAnimation
impl Sync for ScrollAnimation
impl Unpin for ScrollAnimation
impl UnwindSafe for ScrollAnimation
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