#[repr(u8)]pub enum ScrollPhysicsProfile {
Apple = 0,
Android = 1,
Windows = 2,
Linux = 3,
}Expand description
Platform-tuned scroll physics profile (deceleration, spring frequency, wheel line step,
smooth-wheel time constant, and default rubber-band elasticity).
Variants§
Implementations§
Source§impl ScrollPhysicsProfile
impl ScrollPhysicsProfile
pub const fn platform_default() -> Self
pub const fn deceleration_per_ms(self) -> f32
pub const fn spring_omega(self) -> f32
pub const fn wheel_smooth_tau(self) -> f32
pub const fn px_per_line(self) -> f32
pub const fn rubber_band_default(self) -> bool
pub const fn decay_spec(self) -> DecaySpec
pub fn spring_spec(self) -> SpringSpec
pub const fn smooth_wheel_spec(self) -> SmoothWheelSpec
Trait Implementations§
Source§impl Clone for ScrollPhysicsProfile
impl Clone for ScrollPhysicsProfile
impl Copy for ScrollPhysicsProfile
Source§impl Debug for ScrollPhysicsProfile
impl Debug for ScrollPhysicsProfile
Source§impl Default for ScrollPhysicsProfile
impl Default for ScrollPhysicsProfile
impl Eq for ScrollPhysicsProfile
Source§impl Hash for ScrollPhysicsProfile
impl Hash for ScrollPhysicsProfile
Source§impl PartialEq for ScrollPhysicsProfile
impl PartialEq for ScrollPhysicsProfile
Source§impl ScrollBehavior for ScrollPhysicsProfile
impl ScrollBehavior for ScrollPhysicsProfile
fn bounce_by_default(&self) -> bool
fn rubber_band_spec(&self) -> Option<RubberBandSpec>
fn decay_spec(&self) -> Option<DecaySpec>
fn snap_target(&self, _query: SnapQuery) -> Option<f32>
fn return_spring(&self) -> SpringSpec
fn smooth_wheel_spec(&self) -> Option<SmoothWheelSpec>
fn px_per_line(&self) -> f32
fn min_fling_velocity(&self) -> f32
impl StructuralPartialEq for ScrollPhysicsProfile
Auto Trait Implementations§
impl Forget for ScrollPhysicsProfile
impl Freeze for ScrollPhysicsProfile
impl Move for ScrollPhysicsProfile
impl RefUnwindSafe for ScrollPhysicsProfile
impl Send for ScrollPhysicsProfile
impl Sync for ScrollPhysicsProfile
impl Unpin for ScrollPhysicsProfile
impl UnsafeUnpin for ScrollPhysicsProfile
impl UnwindSafe for ScrollPhysicsProfile
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