pub enum ExternalDragEvent {
Entered {
data: ExternalDropData,
position: Point,
},
Moved {
position: Point,
},
Left,
Dropped {
data: ExternalDropData,
position: Point,
},
DragEnded {
outcome: DropOutcome,
},
}Expand description
One phase of an external (OS) drag over a window. Positions are in the window’s logical coordinate space (top-left origin), already converted from the platform’s native coordinates.
Variants§
Entered
The drag entered the window. data is the best-effort payload the
source offers (fully populated where the platform exposes it during
hover — e.g. macOS; possibly empty until drop on backends that only
transfer bytes at drop time). Lets a drop target validate on hover.
Fields
data: ExternalDropDataOffered payload (files / text / URLs); may be empty until drop.
Moved
The pointer moved while the drag is over the window.
Left
The drag left the window, or the OS cancelled the operation, without a drop.
Dropped
The user dropped. Carries the extracted payload and the drop position.
Fields
data: ExternalDropDataFiles / text / URLs / raw MIME bytes extracted from the OS payload.
DragEnded
An outbound (app → OS) drag this window started has finished. Posted
by the platform backend’s drag-source callback so the framework can
notify the source widget’s on_drag_ended.
Fields
outcome: DropOutcomeHow the OS drag resolved (copy / move into another app, or cancel).
Trait Implementations§
Source§impl Clone for ExternalDragEvent
impl Clone for ExternalDragEvent
Source§fn clone(&self) -> ExternalDragEvent
fn clone(&self) -> ExternalDragEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalDragEvent
impl RefUnwindSafe for ExternalDragEvent
impl Send for ExternalDragEvent
impl Sync for ExternalDragEvent
impl Unpin for ExternalDragEvent
impl UnsafeUnpin for ExternalDragEvent
impl UnwindSafe for ExternalDragEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.