# ActivatedEventArgs

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

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

```rust
struct ActivatedEventArgs
```

Event arguments for the activated and deactivated events of an
activatable lifetime.

The arguments of the more specific activations are reached through the
`as_*` methods.

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

## Members

- [`new`](#function-new)
- [`kind`](#function-kind)
- [`as_protocol_activated`](#function-as_protocol_activated)
- [`as_file_activated`](#function-as_file_activated)

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

### new

```rust
fn new(kind: ActivationKind) -> Self
```

Creates the arguments of an activation of the given kind.

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

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

### kind

```rust
fn kind(self: &Self) -> ActivationKind
```

The kind of activation.

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

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

### as_protocol_activated

```rust
fn as_protocol_activated(self: &Self) -> Option<&ProtocolActivatedEventArgs>
```

The arguments as those of a protocol activation, if that is what
they are.

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

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

### as_file_activated

```rust
fn as_file_activated(self: &Self) -> Option<&FileActivatedEventArgs>
```

The arguments as those of a file activation, if that is what they
are.

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

## 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`
- `From<ProtocolActivatedEventArgs>`
- `From<FileActivatedEventArgs>`

## Availability

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