pub struct DragSession {
pub source_id: u64,
pub payload: DragPayload,
pub start_px: (f32, f32),
pub over_id: Option<u64>,
pub source_rect: Rect,
pub grab_offset: Vec2,
pub preview: Option<DragPreview>,
}Expand description
Tracks an active drag session (internal widget-to-widget DnD).
Fields§
§source_id: u64§payload: DragPayload§start_px: (f32, f32)§over_id: Option<u64>§source_rect: RectSource hit rect at drag start (px).
grab_offset: Vec2Pointer - source origin at drag start.
preview: Option<DragPreview>Optional custom decoration (Compose drawDragDecoration).
Trait Implementations§
Source§impl Clone for DragSession
impl Clone for DragSession
Source§fn clone(&self) -> DragSession
fn clone(&self) -> DragSession
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 !RefUnwindSafe for DragSession
impl !Send for DragSession
impl !Sync for DragSession
impl !UnwindSafe for DragSession
impl Freeze for DragSession
impl Unpin for DragSession
impl UnsafeUnpin for DragSession
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