# ShutdownRequestedEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/application_lifetimes/struct-shutdownrequestedeventargs/

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

```rust
struct ShutdownRequestedEventArgs
```

Provides data for the shutdown requested event of an application
lifetime.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L6)

## Members

- [`new`](#function-new)
- [`with_is_os_shutdown`](#function-with_is_os_shutdown)
- [`cancel`](#function-cancel)
- [`set_cancel`](#function-set_cancel)
- [`is_os_shutdown`](#function-is_os_shutdown)
- [`will_exit_main_loop`](#function-will_exit_main_loop)
- [`set_will_exit_main_loop`](#function-set_will_exit_main_loop)

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

### new

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

Creates the event args.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L14)

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

### with_is_os_shutdown

```rust
fn with_is_os_shutdown(is_os_shutdown: bool) -> Self
```

Creates the event args for a shutdown that is or is not caused by
the operating system shutting down. For platform backends and the
lifetimes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L21)

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

### cancel

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

Whether the event should be canceled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L26)

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

### set_cancel

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

Sets whether the event should be canceled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L31)

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

### is_os_shutdown

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

Is the operating system shutting down. For platform backends and the
lifetimes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L37)

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

### will_exit_main_loop

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

Indicates that the accepted shutdown will exit the main loop. For
platform backends and the lifetimes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L43)

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

### set_will_exit_main_loop

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

Sets whether the accepted shutdown will exit the main loop.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/application_lifetimes/shutdown_requested_event_args.rs#L48)

## Trait implementations

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

## Availability

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