pub struct ComposedScrollBehavior<B, F, S, W> {
pub boundary: B,
pub fling: F,
pub snap: S,
pub wheel: W,
pub return_spring: SpringReturn,
pub px_per_line: f32,
}Expand description
Zero-overhead static combinator stacking independent boundary, fling, snap, wheel, and spring return decorators.
Fields§
§boundary: B§fling: F§snap: S§wheel: W§return_spring: SpringReturn§px_per_line: f32Implementations§
Source§impl ComposedScrollBehavior<RubberBandBoundary, ExponentialDecayFling, FreeScroll, SmoothWheel>
impl ComposedScrollBehavior<RubberBandBoundary, ExponentialDecayFling, FreeScroll, SmoothWheel>
Source§impl<B, F, S, W> ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> ComposedScrollBehavior<B, F, S, W>
pub fn with_boundary<B2: BoundaryPhysics>( self, boundary: B2, ) -> ComposedScrollBehavior<B2, F, S, W>
pub fn with_fling<F2: FlingPhysics>( self, fling: F2, ) -> ComposedScrollBehavior<B, F2, S, W>
pub fn with_snap<S2: SnapPhysics>( self, snap: S2, ) -> ComposedScrollBehavior<B, F, S2, W>
pub fn with_wheel<W2: WheelPhysics>( self, wheel: W2, ) -> ComposedScrollBehavior<B, F, S, W2>
pub const fn with_spring(self, return_spring: SpringReturn) -> Self
pub const fn with_px_per_line(self, px_per_line: f32) -> Self
Source§impl<B: BoundaryPhysics, F: FlingPhysics, S: SnapPhysics, W: WheelPhysics> ComposedScrollBehavior<B, F, S, W>
impl<B: BoundaryPhysics, F: FlingPhysics, S: SnapPhysics, W: WheelPhysics> ComposedScrollBehavior<B, F, S, W>
Sourcepub fn into_engine(self) -> PooledScrollPhysics<Self>
pub fn into_engine(self) -> PooledScrollPhysics<Self>
Wraps this composed behavior in a zero-allocation PooledScrollPhysics engine.
Trait Implementations§
impl<B: Copy, F: Copy, S: Copy, W: Copy> Copy for ComposedScrollBehavior<B, F, S, W>
Source§impl Default for ComposedScrollBehavior<RubberBandBoundary, ExponentialDecayFling, FreeScroll, SmoothWheel>
impl Default for ComposedScrollBehavior<RubberBandBoundary, ExponentialDecayFling, FreeScroll, SmoothWheel>
Source§impl<B: PartialEq, F: PartialEq, S: PartialEq, W: PartialEq> PartialEq for ComposedScrollBehavior<B, F, S, W>
impl<B: PartialEq, F: PartialEq, S: PartialEq, W: PartialEq> PartialEq for ComposedScrollBehavior<B, F, S, W>
Source§impl<B: BoundaryPhysics, F: FlingPhysics, S: SnapPhysics, W: WheelPhysics> ScrollBehavior for ComposedScrollBehavior<B, F, S, W>
impl<B: BoundaryPhysics, F: FlingPhysics, S: SnapPhysics, W: WheelPhysics> ScrollBehavior for ComposedScrollBehavior<B, F, S, W>
fn bounce_by_default(&self) -> bool
fn rubber_band_spec(&self) -> Option<RubberBandSpec>
fn decay_spec(&self) -> Option<DecaySpec>
fn min_fling_velocity(&self) -> f32
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
impl<B: PartialEq, F: PartialEq, S: PartialEq, W: PartialEq> StructuralPartialEq for ComposedScrollBehavior<B, F, S, W>
Auto Trait Implementations§
impl<B, F, S, W> Forget for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> Freeze for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> Move for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> RefUnwindSafe for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> Send for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> Sync for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> Unpin for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> UnsafeUnpin for ComposedScrollBehavior<B, F, S, W>
impl<B, F, S, W> UnwindSafe for ComposedScrollBehavior<B, F, S, W>
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