pub struct Clipboard { /* private fields */ }Expand description
Implementation of IClipboard on top of a platform clipboard.
Implementations§
Trait Implementations§
Source§impl IClipboard for Clipboard
impl IClipboard for Clipboard
Source§fn clear_async(&self) -> LocalBoxFuture<Result<(), ClipboardError>>
fn clear_async(&self) -> LocalBoxFuture<Result<(), ClipboardError>>
Clears any data from the system clipboard.
Source§fn set_data_async(
&self,
data_transfer: Option<Rc<dyn IAsyncDataTransfer>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>
fn set_data_async( &self, data_transfer: Option<Rc<dyn IAsyncDataTransfer>>, ) -> LocalBoxFuture<Result<(), ClipboardError>>
Places a data object on the clipboard. The data may be queried
lazily by the system: the data transfer must stay valid until the
clipboard is cleared or replaced.
None clears the clipboard. Read moreSource§fn flush_async(&self) -> LocalBoxFuture<Result<(), ClipboardError>>
fn flush_async(&self) -> LocalBoxFuture<Result<(), ClipboardError>>
Permanently adds the data that is on the clipboard so that it is
available after the data’s original application closes. Read more
Source§fn try_get_data_async(
&self,
) -> LocalBoxFuture<Result<Option<Rc<dyn IAsyncDataTransfer>>, ClipboardError>>
fn try_get_data_async( &self, ) -> LocalBoxFuture<Result<Option<Rc<dyn IAsyncDataTransfer>>, ClipboardError>>
Retrieves data previously stored on the clipboard. Read more
Source§fn try_get_in_process_data_async(
&self,
) -> LocalBoxFuture<Result<Option<Rc<dyn IAsyncDataTransfer>>, ClipboardError>>
fn try_get_in_process_data_async( &self, ) -> LocalBoxFuture<Result<Option<Rc<dyn IAsyncDataTransfer>>, ClipboardError>>
Retrieves the exact instance of a data transfer previously placed on
the clipboard by
set_data_async, if any. Read moreAuto Trait Implementations§
impl !Freeze for Clipboard
impl !RefUnwindSafe for Clipboard
impl !Send for Clipboard
impl !Sync for Clipboard
impl !UnwindSafe for Clipboard
impl Unpin for Clipboard
impl UnsafeUnpin for Clipboard
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read moreSource§impl<I> ClipboardExtensions for Iwhere
I: IClipboard + ?Sized,
impl<I> ClipboardExtensions for Iwhere
I: IClipboard + ?Sized,
Source§fn get_data_formats_async(
&self,
) -> LocalBoxFuture<Result<Rc<[DataFormat]>, ClipboardError>>
fn get_data_formats_async( &self, ) -> LocalBoxFuture<Result<Rc<[DataFormat]>, ClipboardError>>
Returns a list containing the formats currently available from the
clipboard. It is empty if the clipboard is empty.
Source§fn try_get_value_async<T: Clone + 'static>(
&self,
format: &DataFormatOf<T>,
) -> LocalBoxFuture<Result<Option<T>, ClipboardError>>
fn try_get_value_async<T: Clone + 'static>( &self, format: &DataFormatOf<T>, ) -> LocalBoxFuture<Result<Option<T>, ClipboardError>>
Tries to get a value for a given format from the clipboard. The
future resolves to
None if the format is not supported. Read moreSource§fn try_get_values_async<T: Clone + 'static>(
&self,
format: &DataFormatOf<T>,
) -> LocalBoxFuture<Result<Option<Vec<T>>, ClipboardError>>
fn try_get_values_async<T: Clone + 'static>( &self, format: &DataFormatOf<T>, ) -> LocalBoxFuture<Result<Option<Vec<T>>, ClipboardError>>
Tries to get multiple values for a given format from the clipboard.
The future resolves to
None if the format is not supported.Source§fn set_value_async<T: 'static>(
&self,
format: &DataFormatOf<T>,
value: Option<T>,
) -> LocalBoxFuture<Result<(), ClipboardError>>
fn set_value_async<T: 'static>( &self, format: &DataFormatOf<T>, value: Option<T>, ) -> LocalBoxFuture<Result<(), ClipboardError>>
Places a single value on the clipboard in the specified format. Read more
Source§fn set_values_async<T: 'static>(
&self,
format: &DataFormatOf<T>,
values: Option<impl IntoIterator<Item = T>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>where
Self: Sized,
fn set_values_async<T: 'static>(
&self,
format: &DataFormatOf<T>,
values: Option<impl IntoIterator<Item = T>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>where
Self: Sized,
Places multiple values on the clipboard in the specified format. Read more
Source§fn try_get_text_async(
&self,
) -> LocalBoxFuture<Result<Option<String>, ClipboardError>>
fn try_get_text_async( &self, ) -> LocalBoxFuture<Result<Option<String>, ClipboardError>>
Returns a text, if available, from the clipboard.
Source§fn try_get_file_async(
&self,
) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageItem>>, ClipboardError>>
fn try_get_file_async( &self, ) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageItem>>, ClipboardError>>
Returns a file (or folder), if available, from the clipboard.
Source§fn try_get_files_async(
&self,
) -> LocalBoxFuture<Result<Option<Vec<Rc<dyn IStorageItem>>>, ClipboardError>>
fn try_get_files_async( &self, ) -> LocalBoxFuture<Result<Option<Vec<Rc<dyn IStorageItem>>>, ClipboardError>>
Returns the files (or folders), if available, from the clipboard.
Source§fn try_get_bitmap_async(
&self,
) -> LocalBoxFuture<Result<Option<Rc<Bitmap>>, ClipboardError>>
fn try_get_bitmap_async( &self, ) -> LocalBoxFuture<Result<Option<Rc<Bitmap>>, ClipboardError>>
Returns a bitmap, if available, from the clipboard.
Source§fn set_text_async(
&self,
text: Option<&str>,
) -> LocalBoxFuture<Result<(), ClipboardError>>
fn set_text_async( &self, text: Option<&str>, ) -> LocalBoxFuture<Result<(), ClipboardError>>
Places a text on the clipboard. Read more
Source§fn set_file_async(
&self,
file: Option<Rc<dyn IStorageItem>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>
fn set_file_async( &self, file: Option<Rc<dyn IStorageItem>>, ) -> LocalBoxFuture<Result<(), ClipboardError>>
Places a file (or folder) on the clipboard. Read more
Source§fn set_files_async(
&self,
files: Option<impl IntoIterator<Item = Rc<dyn IStorageItem>>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>where
Self: Sized,
fn set_files_async(
&self,
files: Option<impl IntoIterator<Item = Rc<dyn IStorageItem>>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>where
Self: Sized,
Places a list of files (or folders) on the clipboard. Read more
Source§fn set_bitmap_async(
&self,
bitmap: Option<Rc<Bitmap>>,
) -> LocalBoxFuture<Result<(), ClipboardError>>
fn set_bitmap_async( &self, bitmap: Option<Rc<Bitmap>>, ) -> LocalBoxFuture<Result<(), ClipboardError>>
Places a bitmap on the clipboard. Read more