AsyncDataTransferItemExtensions
trait · ferroui-base · v0.5.0
trait AsyncDataTransferItemExtensions: IAsyncDataTransferItem
Contains extension methods for IAsyncDataTransferItem.
Members
containstry_containstry_get_value_asynctry_get_text_asynctry_get_bitmap_asynctry_get_file_async
contains
fn contains(self: &Self, format: &DataFormat) -> bool
Gets whether the item supports a specific format.
try_contains
fn try_contains(self: &Self, format: &DataFormat) -> Result<bool, ClipboardError>
Gets whether the item supports a specific format, or the failure of the platform that provides the formats of the item.
try_get_value_async
fn try_get_value_async<T: Clone + 'static>(self: &Self, format: &DataFormatOf<T>) -> LocalBoxFuture<Result<Option<T>, ClipboardError>>
Tries to get a value for a given format from the item. The future
resolves to None if the format is not supported, and to an error
if the platform providing the value fails.
try_get_text_async
fn try_get_text_async(self: &Self) -> LocalBoxFuture<Result<Option<String>, ClipboardError>>
Returns a text, if available, from the item.
try_get_bitmap_async
fn try_get_bitmap_async(self: &Self) -> LocalBoxFuture<Result<Option<Rc<Bitmap>>, ClipboardError>>
Returns a bitmap, if available, from the item.
try_get_file_async
fn try_get_file_async(self: &Self) -> LocalBoxFuture<Result<Option<Rc<dyn IStorageItem>>, ClipboardError>>
Returns a file (or folder), if available, from the item.
See DataFormat::file.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.