pub struct ClampedSimulation<S>where
S: Simulation,{ /* private fields */ }Expand description
The shared animation layer — physics, curves, driver — see
frus_core::animation. Re-exported here so applications can reach it through
frus_widgets without depending on frus-core directly.
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> ClampedSimulation<S>where
S: Simulation,
impl<S> ClampedSimulation<S>where
S: Simulation,
Sourcepub fn new(inner: S, min: f32, max: f32) -> ClampedSimulation<S>
pub fn new(inner: S, min: f32, max: f32) -> ClampedSimulation<S>
Wraps inner, constraining its position to [min, max].
Trait Implementations§
Source§impl<S> Simulation for ClampedSimulation<S>where
S: Simulation,
impl<S> Simulation for ClampedSimulation<S>where
S: Simulation,
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