# DragInfo

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-treedatagrid/models/struct-draginfo/

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

```rust
struct DragInfo
```

`DragInfo`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L15)

## Members

- [`data_format`](#function-data_format)
- [`new`](#function-new)
- [`from_presentation`](#function-from_presentation)
- [`source`](#function-source)
- [`model`](#function-model)
- [`source_identity`](#function-source_identity)
- [`indexes`](#function-indexes)

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

### data_format

```rust
fn data_format() -> DataFormatOf<String>
```

The data format that carries the drag token in a data transfer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L23)

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

### new

```rust
fn new(source: Rc<dyn ITreeDataGridSource>, indexes: Vec<IndexPath>) -> Self
```

The drag of the rows at `indexes` of `source`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L28)

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

### from_presentation

```rust
fn from_presentation(presentation: &dyn TreeDataGridPresentation, source: Option<Rc<dyn ITreeDataGridSource>>, indexes: Vec<IndexPath>) -> Self
```

The drag of the rows at `indexes` of the source `presentation` presents, identified by the
presentation's identity. The source is `source` when the caller has it, otherwise the
identity itself when it holds a shared source handle (`Rc<dyn ITreeDataGridSource>`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L36)

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

### source

```rust
fn source(self: &Self) -> Rc<dyn ITreeDataGridSource>
```

The source the rows are dragged from.
## Panics
When the drag carries no source (`InvalidOperationException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L50)

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

### model

```rust
fn model(self: &Self) -> Option<Rc<dyn ITreeDataGridSource>>
```

The core source the rows are dragged from, if the drag carries one (`Model`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L58)

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

### source_identity

```rust
fn source_identity(self: &Self) -> &Rc<dyn Any>
```

The identity of the dragged source, to tell whether a drop targets the same source.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L63)

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

### indexes

```rust
fn indexes(self: &Self) -> &[IndexPath]
```

The model indexes of the dragged rows.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/drag_info.rs#L68)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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