pub enum DragSource<'a, K> {
SameView {
key: K,
},
Foreign {
payload: &'a DragPayload,
},
}Expand description
Who is dragging, from the receiving source’s point of view.
SameView is an intra-view reorder identified by the dragged row’s key.
Foreign is everything else — an in-app drag from another view or an OS
drop — carried as a type-erased [DragPayload] the source downcasts itself
(e.g. a designer source downcasts to its palette-drop type, a list source to
its item type, an OS drop to files). This single distinction is exactly what
TabBar already encodes via its source_bar_id.
Variants§
SameView
An intra-view reorder; key identifies the dragged row.
Fields
§
key: KForeign
A drag from another view or the OS; downcast payload to interpret it.
Fields
§
payload: &'a DragPayloadAuto Trait Implementations§
impl<'a, K> !RefUnwindSafe for DragSource<'a, K>
impl<'a, K> !Send for DragSource<'a, K>
impl<'a, K> !Sync for DragSource<'a, K>
impl<'a, K> !UnwindSafe for DragSource<'a, K>
impl<'a, K> Freeze for DragSource<'a, K>where
K: Freeze,
impl<'a, K> Unpin for DragSource<'a, K>where
K: Unpin,
impl<'a, K> UnsafeUnpin for DragSource<'a, K>where
K: UnsafeUnpin,
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