# AsyncDataTransferItemExtensions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/trait-asyncdatatransferitemextensions/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait AsyncDataTransferItemExtensions: IAsyncDataTransferItem
```

Contains extension methods for [`IAsyncDataTransferItem`](/docs/0.5.0/api/ferroui-base/input/trait-iasyncdatatransferitem/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L8)

## Members

- [`contains`](#function-contains)
- [`try_contains`](#function-try_contains)
- [`try_get_value_async`](#function-try_get_value_async)
- [`try_get_text_async`](#function-try_get_text_async)
- [`try_get_bitmap_async`](#function-try_get_bitmap_async)
- [`try_get_file_async`](#function-try_get_file_async)

<a id="function-contains"></a>

### contains

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

Gets whether the item supports a specific format.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L10)

<a id="function-try_contains"></a>

### try_contains

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L16)

<a id="function-try_get_value_async"></a>

### try_get_value_async

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L23)

<a id="function-try_get_text_async"></a>

### try_get_text_async

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

Returns a text, if available, from the item.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L32)

<a id="function-try_get_bitmap_async"></a>

### try_get_bitmap_async

```rust
fn try_get_bitmap_async(self: &Self) -> LocalBoxFuture<Result<Option<Rc<Bitmap>>, ClipboardError>>
```

Returns a bitmap, if available, from the item.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L37)

<a id="function-try_get_file_async"></a>

### try_get_file_async

```rust
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](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/async_data_transfer_item_extensions.rs#L44)

## Trait implementations

- [`AsyncDataTransferItemExtensions`](/docs/0.5.0/api/ferroui-base/input/trait-asyncdatatransferitemextensions/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
