[−][src]Struct gravitas::Scroll
a combination of friction and springs to create a touch-driven scrolling simulation.
Methods
impl Scroll
[src]
pub fn new(extent: f32) -> Scroll
[src]
Create a new scroll simulation which allows scrolls between 0 and the given extent.
pub fn set(&mut self, x: f32, v: f32)
[src]
Start a gesture-based scroll from the scroll position x
with velocity v
.
pub fn extent(&self) -> f32
[src]
Return the maximum extent which can be scrolled to.
Trait Implementations
impl Simulation for Scroll
[src]
fn x(&self, time: f32) -> f32
[src]
fn dx(&self, time: f32) -> f32
[src]
fn is_done(&self, time: f32) -> bool
[src]
impl Clone for Scroll
[src]
impl Copy for Scroll
[src]
Auto Trait Implementations
impl Send for Scroll
impl Sync for Scroll
impl Unpin for Scroll
impl UnwindSafe for Scroll
impl RefUnwindSafe for Scroll
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,