# DrawerClosingEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/page/struct-drawerclosingeventargs/

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

```rust
struct DrawerClosingEventArgs
```

Provides data for the `Closing` routed event of the drawer page.

The cancel flag is shared: a clone is another handle to the same args.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L10)

## Members

- [`new`](#function-new)
- [`with_event`](#function-with_event)
- [`with_event_and_source`](#function-with_event_and_source)
- [`cancel`](#function-cancel)
- [`set_cancel`](#function-set_cancel)

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

### new

```rust
fn new() -> Self
```

Creates args with no routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L19)

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

### with_event

```rust
fn with_event<T: ?Sized>(routed_event: &RoutedEvent<T>) -> Self
```

Creates args for the routed event associated with these event data.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L24)

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

### with_event_and_source

```rust
fn with_event_and_source<T: ?Sized>(routed_event: &RoutedEvent<T>, source: impl Into<Nullable<FerroObject>>) -> Self
```

Creates args for a routed event with a source.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L29)

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

### cancel

```rust
fn cancel(self: &Self) -> bool
```

Whether the closing should be cancelled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L38)

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

### set_cancel

```rust
fn set_cancel(self: &Self, value: bool)
```

Sets whether the closing should be cancelled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/page/drawer_closing_event_args.rs#L44)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)

## Availability

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