pub struct ActionType { /* private fields */ }Expand description
A group of Actions a notification can display, referenced by
NotificationBuilder::action_type_id.
Register it with Notification::register_action_types before sending a notification that uses it.
It maps to a UNNotificationCategory on iOS, to an action group on Android and to the
buttons of the notification on desktop.
Use ActionType::builder to construct one.
Implementations§
Source§impl ActionType
impl ActionType
Sourcepub fn builder(id: impl Into<String>) -> ActionTypeBuilder
pub fn builder(id: impl Into<String>) -> ActionTypeBuilder
Creates a builder for an action type with the given identifier.
All the optional settings default to false or None;
call ActionTypeBuilder::build to get the ActionType.
The placeholder shown instead of the notification body when previews are hidden.
Only used on iOS.
Sourcepub fn custom_dismiss_action(&self) -> bool
pub fn custom_dismiss_action(&self) -> bool
Whether the app is notified when the user dismisses the notification.
Only used on iOS.
Sourcepub fn allow_in_car_play(&self) -> bool
pub fn allow_in_car_play(&self) -> bool
Whether the notification can be displayed in a CarPlay environment.
Only used on iOS.
Whether the notification title is shown even when previews are hidden.
Only used on iOS.
Whether the notification subtitle is shown even when previews are hidden.
Only used on iOS.