# [−][src]Enum smithay_client_toolkit::data_device::DndEvent

    pub enum DndEvent<'a> {
        Enter {
            offer: Option<&'a DataOffer>,
            serial: u32,
            surface: Proxy<WlSurface>,
            x: f64,
            y: f64,
        },
        Motion {
            offer: Option<&'a DataOffer>,
            time: u32,
            x: f64,
            y: f64,
        },
        Leave,
        Drop {
            offer: Option<&'a DataOffer>,
        },
    }

Possible events generated during a drag'n'drop session

## Variants

`Enter`

A new drag'n'drop entered your surfaces

### Fields of Enter

`offer: Option<&'a DataOffer>`

The associated data offer

Is None if it is an internal drag'n'drop you started with no source. See `DataDevice::start_drag` for details.

`serial: u32`

A serial associated with the entry of this dnd

`surface: Proxy<WlSurface>`

The entered surface

`x: f64`

horizontal location on the surface

`y: f64`

vertical location on the surface

`Motion`

The drag'n'drop offer moved on the surface

### Fields of Motion

`offer: Option<&'a DataOffer>`

The associated data offer

Is None if it is an internal drag'n'drop you started with no source. See `DataDevice::start_drag` for details.

`time: u32`

The time of this motion

`x: f64`

new horizontal location

`y: f64`

new vertical location

`Leave`

The drag'n'drop offer left your surface

`Drop`

The drag'n'drop was dropped on your surface

### Fields of Drop

`offer: Option<&'a DataOffer>`

The associated data offer

Is None if it is an internal drag'n'drop you started with no source. See `DataDevice::start_drag` for details.

## Auto Trait Implementations

### `impl<'a> Send for DndEvent<'a>`

### `impl<'a> Unpin for DndEvent<'a>`

### `impl<'a> Sync for DndEvent<'a>`

### `impl<'a> !UnwindSafe for DndEvent<'a>`

### `impl<'a> !RefUnwindSafe for DndEvent<'a>`

## Blanket Implementations

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `fn into(self) -> U`[src]

Performs the conversion.

### `impl<T> From<T> for T`[src]

#### `fn from(t: T) -> T`[src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`[src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`[src]

Performs the conversion.

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `fn borrow_mut(&mut self) -> &mut T`[src]

Mutably borrows from an owned value. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `fn borrow(&self) -> &T`[src]

Immutably borrows from an owned value. Read more

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `fn type_id(&self) -> TypeId`[src]

Gets the `TypeId` of `self`. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)