FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AsyncDataTransferItemExtensions

    trait · ferroui-base · v0.5.0

    trait AsyncDataTransferItemExtensions: IAsyncDataTransferItem
    

    Contains extension methods for IAsyncDataTransferItem.

    View source

    Members

    contains

    fn contains(self: &Self, format: &DataFormat) -> bool
    

    Gets whether the item supports a specific format.

    Source

    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.

    Source

    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.

    Source

    try_get_text_async

    fn try_get_text_async(self: &Self) -> LocalBoxFuture<Result<Option<String>, ClipboardError>>
    

    Returns a text, if available, from the item.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.