pub struct UseScrollReturn<SetXFn, SetYFn, MFn>where
SetXFn: Fn(f64) + Clone + Send + Sync,
SetYFn: Fn(f64) + Clone + Send + Sync,
MFn: Fn() + Clone + Send + Sync,{
pub x: Signal<f64>,
pub set_x: SetXFn,
pub y: Signal<f64>,
pub set_y: SetYFn,
pub is_scrolling: Signal<bool>,
pub arrived_state: Signal<Directions>,
pub directions: Signal<Directions>,
pub measure: MFn,
}Expand description
The return value of use_scroll.
Fields§
§x: Signal<f64>X coordinate of scroll position
set_x: SetXFnSets the value of x. This does also scroll the element.
y: Signal<f64>Y coordinate of scroll position
set_y: SetYFnSets the value of y. This does also scroll the element.
is_scrolling: Signal<bool>Is true while the element is being scrolled.
arrived_state: Signal<Directions>Sets the field that represents a direction to true if the element is scrolled all the way to that side.
directions: Signal<Directions>The directions in which the element is being scrolled are set to true.
measure: MFnRe-evaluates the arrived_state.
Auto Trait Implementations§
impl<SetXFn, SetYFn, MFn> Freeze for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> RefUnwindSafe for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> Send for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> Sync for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> Unpin for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> UnsafeUnpin for UseScrollReturn<SetXFn, SetYFn, MFn>
impl<SetXFn, SetYFn, MFn> UnwindSafe for UseScrollReturn<SetXFn, SetYFn, MFn>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.