pub struct ElasticBounceState {
pub velocity: f32,
pub active: bool,
pub last_time: Option<Instant>,
}Expand description
Tracks elastic bounce-back animation when the user scrolls past chart edges.
When the chart reaches its data boundaries, a spring-like bounce animation pushes the viewport back into valid range. This prevents the user from scrolling into empty space and provides tactile feedback.
Fields§
§velocity: f32Bounce velocity (pixels per second)
active: boolWhether bounce animation is active
last_time: Option<Instant>Last update time for animation
Implementations§
Trait Implementations§
Source§impl Clone for ElasticBounceState
impl Clone for ElasticBounceState
Source§fn clone(&self) -> ElasticBounceState
fn clone(&self) -> ElasticBounceState
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 moreSource§impl Debug for ElasticBounceState
impl Debug for ElasticBounceState
Auto Trait Implementations§
impl Freeze for ElasticBounceState
impl RefUnwindSafe for ElasticBounceState
impl Send for ElasticBounceState
impl Sync for ElasticBounceState
impl Unpin for ElasticBounceState
impl UnsafeUnpin for ElasticBounceState
impl UnwindSafe for ElasticBounceState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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