pub struct ScrollController<T: Clone + 'static> { /* private fields */ }Expand description
Explicit programmatic control for a scrollable view.
A controller owns a reactive target and a monotonically increasing request generation. The generation makes repeated requests to the same target observable after the user has scrolled elsewhere.
Implementations§
Source§impl<T: Clone + 'static> ScrollController<T>
impl<T: Clone + 'static> ScrollController<T>
Sourcepub fn new(initial_target: T) -> Self
pub fn new(initial_target: T) -> Self
Creates a controller whose first target is initial_target.
Sourcepub fn target(&self) -> Computed<T>
pub fn target(&self) -> Computed<T>
Returns the current requested target as a read-only signal.
Sourcepub fn generation(&self) -> Computed<i32>
pub fn generation(&self) -> Computed<i32>
Returns the request generation as a read-only signal.
Trait Implementations§
Source§impl<T: Clone + Clone + 'static> Clone for ScrollController<T>
impl<T: Clone + Clone + 'static> Clone for ScrollController<T>
Source§fn clone(&self) -> ScrollController<T>
fn clone(&self) -> ScrollController<T>
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 moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for ScrollController<T>
impl<T> !Send for ScrollController<T>
impl<T> !Sync for ScrollController<T>
impl<T> !UnwindSafe for ScrollController<T>
impl<T> Freeze for ScrollController<T>
impl<T> Unpin for ScrollController<T>
impl<T> UnsafeUnpin for ScrollController<T>where
Binding<T>: UnsafeUnpin,
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