pub struct FileDragOptions {
pub preview: Option<PathBuf>,
pub copy: bool,
}Expand description
从窗口拖出文件的选项。
Fields§
§preview: Option<PathBuf>拖拽预览图路径;None = 尝试使用第一个文件(不是图片时无预览)。
copy: booltrue = 复制(默认);false = 移动。
Implementations§
Source§impl FileDragOptions
impl FileDragOptions
pub fn new() -> FileDragOptions
pub fn with_preview(self, path: impl Into<PathBuf>) -> FileDragOptions
pub fn with_copy(self, copy: bool) -> FileDragOptions
Trait Implementations§
Source§impl Clone for FileDragOptions
impl Clone for FileDragOptions
Source§fn clone(&self) -> FileDragOptions
fn clone(&self) -> FileDragOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileDragOptions
impl Debug for FileDragOptions
Source§impl Default for FileDragOptions
impl Default for FileDragOptions
Source§fn default() -> FileDragOptions
fn default() -> FileDragOptions
Returns the “default value” for a type. Read more
impl Eq for FileDragOptions
Source§impl PartialEq for FileDragOptions
impl PartialEq for FileDragOptions
impl StructuralPartialEq for FileDragOptions
Auto Trait Implementations§
impl Forget for FileDragOptions
impl Freeze for FileDragOptions
impl Move for FileDragOptions
impl RefUnwindSafe for FileDragOptions
impl Send for FileDragOptions
impl Sync for FileDragOptions
impl Unpin for FileDragOptions
impl UnsafeUnpin for FileDragOptions
impl UnwindSafe for FileDragOptions
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
impl<T> Brush for 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.