Skip to main content

DragSource

Trait DragSource 

Source
pub trait DragSource {
    // Required method
    fn drag_data(&self) -> Option<DragData>;

    // Provided method
    fn allowed_effects(&self) -> &[DropEffect] { ... }
}
Expand description

Something that can originate a drag.

Required Methods§

Source

fn drag_data(&self) -> Option<DragData>

Produce the payload to carry for this drag, or None to not start one.

Provided Methods§

Source

fn allowed_effects(&self) -> &[DropEffect]

The effects this source permits (defaults to copy + move).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§