pub struct DragAndDropState { /* private fields */ }Expand description
The one transfer in flight in an app context, the targets attached in it, and the steps the source recorded since the shell last routed.
Implementations§
Source§impl DragAndDropState
impl DragAndDropState
Sourcepub fn is_target(&self, node: NodeId) -> bool
pub fn is_target(&self, node: NodeId) -> bool
Whether node carries a drag_and_drop_target right now.
Sourcepub fn route(
&self,
find_target: impl FnMut(DragAndDropPoint) -> Option<(NodeId, Point)>,
) -> bool
pub fn route( &self, find_target: impl FnMut(DragAndDropPoint) -> Option<(NodeId, Point)>, ) -> bool
Delivers every step recorded since the last call. find_target
names the target node under a point and the point in that node’s
surface; the shell answers it from its surfaces and their positions
on the screen. Returns whether anything was delivered.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DragAndDropState
impl !RefUnwindSafe for DragAndDropState
impl !Send for DragAndDropState
impl !Sync for DragAndDropState
impl !UnwindSafe for DragAndDropState
impl Unpin for DragAndDropState
impl UnsafeUnpin for DragAndDropState
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