pub struct ScrollDriver { /* private fields */ }Expand description
Scroll position driver for scroll-linked animations.
Implementations§
Source§impl ScrollDriver
impl ScrollDriver
Sourcepub fn new(min: f32, max: f32) -> Self
pub fn new(min: f32, max: f32) -> Self
Create a scroll driver with a min and max scroll position.
Sourcepub fn set_position(&self, position: f32)
pub fn set_position(&self, position: f32)
Set the current scroll position.
Sourcepub fn animation_count(&self) -> usize
pub fn animation_count(&self) -> usize
Number of registered animations.
Sourcepub fn clear_completed(&self)
pub fn clear_completed(&self)
Remove completed animations.
Trait Implementations§
Source§impl Clone for ScrollDriver
impl Clone for ScrollDriver
Source§fn clone(&self) -> ScrollDriver
fn clone(&self) -> ScrollDriver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScrollDriver
impl Debug for ScrollDriver
Source§impl From<ScrollDriver> for JsValue
impl From<ScrollDriver> for JsValue
Source§fn from(value: ScrollDriver) -> Self
fn from(value: ScrollDriver) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ScrollDriver
impl FromWasmAbi for ScrollDriver
Source§impl IntoWasmAbi for ScrollDriver
impl IntoWasmAbi for ScrollDriver
Source§impl LongRefFromWasmAbi for ScrollDriver
impl LongRefFromWasmAbi for ScrollDriver
Source§type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<ScrollDriver>
type Anchor = RcRef<ScrollDriver>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for ScrollDriver
impl OptionFromWasmAbi for ScrollDriver
Source§impl OptionIntoWasmAbi for ScrollDriver
impl OptionIntoWasmAbi for ScrollDriver
Source§impl RefFromWasmAbi for ScrollDriver
impl RefFromWasmAbi for ScrollDriver
Source§type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<ScrollDriver>
type Anchor = RcRef<ScrollDriver>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for ScrollDriver
impl RefMutFromWasmAbi for ScrollDriver
Source§type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
type Abi = WasmPtr<WasmRefCell<ScrollDriver>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<ScrollDriver>
type Anchor = RcRefMut<ScrollDriver>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for ScrollDriver
impl TryFromJsValue for ScrollDriver
Source§impl VectorFromWasmAbi for ScrollDriver
impl VectorFromWasmAbi for ScrollDriver
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ScrollDriver]>
Source§impl VectorIntoWasmAbi for ScrollDriver
impl VectorIntoWasmAbi for ScrollDriver
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ScrollDriver]>) -> Self::Abi
Source§impl WasmDescribeVector for ScrollDriver
impl WasmDescribeVector for ScrollDriver
impl SupportsConstructor for ScrollDriver
impl SupportsInstanceProperty for ScrollDriver
impl SupportsStaticProperty for ScrollDriver
Auto Trait Implementations§
impl Freeze for ScrollDriver
impl RefUnwindSafe for ScrollDriver
impl Send for ScrollDriver
impl Sync for ScrollDriver
impl Unpin for ScrollDriver
impl UnsafeUnpin for ScrollDriver
impl UnwindSafe for ScrollDriver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.