# MaterialSnackbarHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-material/struct-materialsnackbarhost/

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

```rust
struct MaterialSnackbarHost
```

A XAML-friendly host for a FIFO queue of Material snackbars.
Place it in the bottom row or overlay of the application's existing layout.
At most one request is actionable; outgoing visuals may overlap during their exit fade.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L244)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`reduced_motion_property`](#function-reduced_motion_property)
- [`motion_scheme_property`](#function-motion_scheme_property)
- [`is_open_property`](#function-is_open_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`reduced_motion`](#function-reduced_motion)
- [`set_reduced_motion`](#function-set_reduced_motion)
- [`motion_scheme`](#function-motion_scheme)
- [`set_motion_scheme`](#function-set_motion_scheme)
- [`is_open`](#function-is_open)
- [`queued_count`](#function-queued_count)
- [`current_id`](#function-current_id)
- [`current_snackbar`](#function-current_snackbar)
- [`set_timeout_policy`](#function-set_timeout_policy)
- [`show`](#function-show)
- [`dismiss_current`](#function-dismiss_current)
- [`cancel`](#function-cancel)
- [`clear`](#function-clear)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L262)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<MaterialSnackbarHost>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L262)

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

### reduced_motion_property

```rust
fn reduced_motion_property() -> &'static StyledProperty<bool>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L344)

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

### motion_scheme_property

```rust
fn motion_scheme_property() -> &'static StyledProperty<MaterialMotionScheme>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L344)

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

### is_open_property

```rust
fn is_open_property() -> &'static DirectProperty<MaterialSnackbarHost, bool>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L344)

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

### construct

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L357)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L376)

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

### reduced_motion

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L379)

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

### set_reduced_motion

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L382)

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

### motion_scheme

```rust
fn motion_scheme(self: &Self) -> MaterialMotionScheme
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L385)

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

### set_motion_scheme

```rust
fn set_motion_scheme(self: &Self, value: MaterialMotionScheme)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L388)

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

### is_open

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L391)

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

### queued_count

```rust
fn queued_count(self: &Self) -> usize
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L394)

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

### current_id

```rust
fn current_id(self: &Self) -> Option<u64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L397)

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

### current_snackbar

```rust
fn current_snackbar(self: &Self) -> Option<Ref<MaterialSnackbar>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L400)

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

### set_timeout_policy

```rust
fn set_timeout_policy(self: &Self, policy: Option<Rc<dyn MaterialSnackbarTimeoutPolicy>>)
```

Set the platform accessibility timeout adapter for subsequently shown requests.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L410)

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

### show

```rust
fn show(self: &Self, message: impl Into<MaterialSnackbarMessage>) -> MaterialSnackbarHandle
```

Queue a message. A discarded handle leaves the request queued; use `.cancel()` explicitly
or `.await` the handle for cancellation tied to the asynchronous operation's lifetime.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L416)

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

### dismiss_current

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L439)

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

### cancel

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

Cancel one active or queued request. A stale identity cannot affect another message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L445)

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

### clear

```rust
fn clear(self: &Self)
```

Cancel the current request and every queued request, without displaying intermediate items.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/snackbar.rs#L468)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<MaterialSnackbarHost>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- `Drop`

## Availability

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