# DataFormatOf

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/struct-dataformatof/

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

```rust
struct DataFormatOf<T>
```

Represents a format usable with the clipboard and drag-and-drop, with a
data type.

`T` is the type of the values of the format as they are handed out:
`String` for text, `Rc<[u8]>` for bytes, `Rc<Bitmap>` for bitmaps. It
is only used to resolve the typed accessors.

This type cannot be instantiated directly. Use universal formats such as
`DataFormat::text`, or create custom formats using
`DataFormat::create_bytes_application_format`,
`DataFormat::create_string_application_format`,
`DataFormat::create_bytes_platform_format`,
`DataFormat::create_string_platform_format` or
`DataFormat::create_in_process_format`.

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

## Members

- [`as_data_format`](#function-as_data_format)

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

### as_data_format

```rust
fn as_data_format(self: &Self) -> &DataFormat
```

The format without its data type.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- `Clone`
- `From<DataFormatOf<T>>`
- `PartialEq<DataFormatOf<U>>`
- `Eq`
- `PartialEq<DataFormat>`
- `PartialEq<DataFormatOf<T>>`
- `Hash`
- `Display`
- `Debug`

## Availability

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