pub struct DragOptions {
pub icon: Option<PathBuf>,
pub icon_data: Option<Vec<u8>>,
pub icon_size: Option<f64>,
pub allow_self_drop: bool,
}Expand description
Options for a drag session.
Fields§
§icon: Option<PathBuf>Image file used as the drag preview instead of the system file icon.
icon_data: Option<Vec<u8>>Encoded image (PNG/JPEG) used as the drag preview; base64 from JS. Handy for a canvas snapshot of the element being dragged.
icon_size: Option<f64>Preview size in points (default 64).
allow_self_drop: boolAllow dropping back onto this app’s own windows (default false,
so the webview does not receive its own drag as a file drop).
Trait Implementations§
Source§impl Clone for DragOptions
impl Clone for DragOptions
Source§impl Debug for DragOptions
impl Debug for DragOptions
Source§impl Default for DragOptions
impl Default for DragOptions
Source§impl<'de> Deserialize<'de> for DragOptions
impl<'de> Deserialize<'de> for DragOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DragOptions
impl RefUnwindSafe for DragOptions
impl Send for DragOptions
impl Sync for DragOptions
impl Unpin for DragOptions
impl UnsafeUnpin for DragOptions
impl UnwindSafe for DragOptions
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