# INotification

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/notifications/trait-inotification/

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

```rust
trait INotification
```

Represents a notification that can be shown in a window or by the host
operating system.

Not meant to be implemented outside the framework.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/i_notification.rs#L12)

## Members

- [`title`](#function-title)
- [`message`](#function-message)
- [`type_`](#function-type_)
- [`expiration`](#function-expiration)
- [`on_click`](#function-on_click)
- [`on_close`](#function-on_close)
- [`to_boxed`](#function-to_boxed)

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

### title

```rust
fn title(self: &Self) -> Option<String>
```

Gets the title of the notification.

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

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

### message

```rust
fn message(self: &Self) -> Option<String>
```

Gets the notification message.

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

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

### type_

```rust
fn type_(self: &Self) -> NotificationType
```

Gets the `NotificationType` of the notification.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/i_notification.rs#L20)

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

### expiration

```rust
fn expiration(self: &Self) -> Duration
```

Gets the expiration time of the notification after which it will
automatically close. If the value is `Duration::ZERO` then the
notification will remain open until the user closes it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/i_notification.rs#L25)

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

### on_click

```rust
fn on_click(self: &Self) -> Option<Rc<dyn Fn() -> ()>>
```

Gets an action to be run when the notification is clicked.

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

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

### on_close

```rust
fn on_close(self: &Self) -> Option<Rc<dyn Fn() -> ()>>
```

Gets an action to be run when the notification is closed.

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

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

### to_boxed

```rust
fn to_boxed(self: Rc<Self>) -> BoxedValue
```

The notification as an untyped value: the object itself, as content
controls display it and bindings read it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/notifications/i_notification.rs#L35)

## Trait implementations

- [`INotification`](/docs/0.5.0/api/ferroui-controls/notifications/trait-inotification/)

## Availability

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