pub struct ClampedSimulation<S: Simulation> { /* private fields */ }Expand description
Pins a simulation’s position into [min, max]; the velocity keeps
reporting the underlying simulation’s. This is what scrolling needs: momentum
is computed freely, but the offset never leaves the bounds.
Implementations§
Source§impl<S: Simulation> ClampedSimulation<S>
impl<S: Simulation> ClampedSimulation<S>
Trait Implementations§
Source§impl<S: Simulation> Simulation for ClampedSimulation<S>
impl<S: Simulation> Simulation for ClampedSimulation<S>
Auto Trait Implementations§
impl<S> Freeze for ClampedSimulation<S>where
S: Freeze,
impl<S> RefUnwindSafe for ClampedSimulation<S>where
S: RefUnwindSafe,
impl<S> Send for ClampedSimulation<S>where
S: Send,
impl<S> Sync for ClampedSimulation<S>where
S: Sync,
impl<S> Unpin for ClampedSimulation<S>where
S: Unpin,
impl<S> UnsafeUnpin for ClampedSimulation<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ClampedSimulation<S>where
S: UnwindSafe,
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