Struct leptos_use::UseDraggableReturn
source · pub struct UseDraggableReturn {
pub x: Signal<f64>,
pub y: Signal<f64>,
pub position: Signal<Position>,
pub set_position: WriteSignal<Position>,
pub is_dragging: Signal<bool>,
pub style: Signal<String>,
}
Expand description
Return type of use_draggable
.
Fields§
§x: Signal<f64>
X coordinate of the element
y: Signal<f64>
Y coordinate of the element
position: Signal<Position>
Position of the element
set_position: WriteSignal<Position>
Set the position of the element manually
is_dragging: Signal<bool>
Whether the element is being dragged
style: Signal<String>
Style attribute “left: {x}px; top: {y}px;”
Auto Trait Implementations§
impl Freeze for UseDraggableReturn
impl !RefUnwindSafe for UseDraggableReturn
impl !Send for UseDraggableReturn
impl !Sync for UseDraggableReturn
impl Unpin for UseDraggableReturn
impl !UnwindSafe for UseDraggableReturn
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