Struct smithay_client_toolkit::data_device::DataSource
source · [−]pub struct DataSource { /* private fields */ }
Expand description
A data source for sending data though copy/paste or drag and drop
Implementations
sourceimpl DataSource
impl DataSource
sourcepub fn new<F, S, It>(
mgr: &Attached<WlDataDeviceManager>,
mime_types: It,
callback: F
) -> DataSource where
F: FnMut(DataSourceEvent, DispatchData<'_>) + 'static,
S: Into<String>,
It: IntoIterator<Item = S>,
pub fn new<F, S, It>(
mgr: &Attached<WlDataDeviceManager>,
mime_types: It,
callback: F
) -> DataSource where
F: FnMut(DataSourceEvent, DispatchData<'_>) + 'static,
S: Into<String>,
It: IntoIterator<Item = S>,
Create a new data source
You’ll then need to provide it to a data device to send it either via selection (aka copy/paste) or via a drag and drop.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DataSource
impl Send for DataSource
impl Sync for DataSource
impl Unpin for DataSource
impl !UnwindSafe for DataSource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more