Struct leptos_use::UseScrollReturn
source · pub struct UseScrollReturn<SetXFn, SetYFn, MFn>{
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: SetXFn
Sets the value of x
. This does also scroll the element.
y: Signal<f64>
Y coordinate of scroll position
set_y: SetYFn
Sets 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: MFn
Re-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> !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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more