pub struct DraggedItems { /* private fields */ }Expand description
The items of one drag as a host hands them out, readable only while their drop is reported
(DraggedItems::report_drop).
Implementations§
Source§impl DraggedItems
impl DraggedItems
Sourcepub fn new(items: Vec<Box<dyn DataTransferItem>>) -> DraggedItems
pub fn new(items: Vec<Box<dyn DataTransferItem>>) -> DraggedItems
items as the system lists them, each read only while their drop is reported.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the drag carries nothing the app could read, which a host refuses.
Sourcepub fn items(&self) -> Vec<Rc<dyn DataTransferItem>>
pub fn items(&self) -> Vec<Rc<dyn DataTransferItem>>
The items, for a report.
Sourcepub fn report_drop<R>(&self, report: impl FnOnce() -> R) -> R
pub fn report_drop<R>(&self, report: impl FnOnce() -> R) -> R
Runs report, which reports the drop: the items are read while it runs, and never after.
Auto Trait Implementations§
impl !RefUnwindSafe for DraggedItems
impl !Send for DraggedItems
impl !Sync for DraggedItems
impl !UnwindSafe for DraggedItems
impl Freeze for DraggedItems
impl Unpin for DraggedItems
impl UnsafeUnpin for DraggedItems
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