# MaterialSnackbarMessage

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

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

```rust
struct MaterialSnackbarMessage
```

Content/options for a queued snackbar. `duration: None` selects the native default:
short without an action, indefinite with an action.

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

## Members

- [`message`](#struct_field-message)
- [`action_label`](#struct_field-action_label)
- [`with_dismiss_action`](#struct_field-with_dismiss_action)
- [`action_on_new_line`](#struct_field-action_on_new_line)
- [`duration`](#struct_field-duration)
- [`new`](#function-new)
- [`with_action`](#function-with_action)
- [`with_duration`](#function-with_duration)
- [`with_dismiss_action`](#function-with_dismiss_action)
- [`with_action_on_new_line`](#function-with_action_on_new_line)
- [`effective_duration`](#function-effective_duration)

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

### message

```rust
message: String
```



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

<a id="struct_field-action_label"></a>

### action_label

```rust
action_label: Option<String>
```



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

<a id="struct_field-with_dismiss_action"></a>

### with_dismiss_action

```rust
with_dismiss_action: bool
```



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

<a id="struct_field-action_on_new_line"></a>

### action_on_new_line

```rust
action_on_new_line: bool
```



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

<a id="struct_field-duration"></a>

### duration

```rust
duration: Option<MaterialSnackbarDuration>
```



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

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

### new

```rust
fn new(message: impl Into<String>) -> Self
```



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

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

### with_action

```rust
fn with_action(self: Self, label: impl Into<String>) -> Self
```



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

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

### with_duration

```rust
fn with_duration(self: Self, duration: MaterialSnackbarDuration) -> Self
```



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

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

### with_dismiss_action

```rust
fn with_dismiss_action(self: Self, visible: bool) -> Self
```



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

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

### with_action_on_new_line

```rust
fn with_action_on_new_line(self: Self, value: bool) -> Self
```



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

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

### effective_duration

```rust
fn effective_duration(self: &Self) -> MaterialSnackbarDuration
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Equivalent<K>`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- `Clone`
- `Debug`
- `Eq`
- `StructuralPartialEq`
- `PartialEq`
- `From<&str>`
- `From<String>`

## Availability

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