pub struct Alert {
pub title: Option<String>,
pub subtitle: Option<String>,
pub body: Option<String>,
pub launch_image: Option<String>,
pub title_loc_key: Option<String>,
pub title_loc_args: Option<Vec<String>>,
pub subtitle_loc_key: Option<String>,
pub subtitle_loc_args: Option<Vec<String>>,
pub loc_key: Option<String>,
pub loc_args: Option<Vec<String>>,
}Expand description
Alert options.
Fields§
§title: Option<String>The title of the notification. Apple Watch displays this string in the short look notification interface. Specify a string that’s quickly understood by the user.
subtitle: Option<String>Additional information that explains the purpose of the notification.
body: Option<String>The content of the alert message.
launch_image: Option<String>The name of the launch image file to display. If the user chooses to launch your app, the contents of the specified image or storyboard file are displayed instead of your app’s normal launch image.
title_loc_key: Option<String>The key for a localized title string. Specify this key instead of
the title key to retrieve the title from your app’s
Localizable.strings files. The value must contain the name of a
key in your strings file.
title_loc_args: Option<Vec<String>>An array of strings containing replacement values for variables in
your title string. Each %@ character in the string specified by
the title-loc-key is replaced by a value from this array. The
first item in the array replaces the first instance of the %@
character in the string, the second item replaces the second
instance, and so on.
subtitle_loc_key: Option<String>The key for a localized subtitle string. Use this key, instead of
the subtitle key, to retrieve the subtitle from your app’s
Localizable.strings file. The value must contain the name of a key
in your strings file.
subtitle_loc_args: Option<Vec<String>>An array of strings containing replacement values for variables in
your title string. Each %@ character in the string specified by
subtitle-loc-key is replaced by a value from this array. The first
item in the array replaces the first instance of the %@ character in
the string, the second item replaces the second instance, and so on.
loc_key: Option<String>The key for a localized message string. Use this key, instead of the
body key, to retrieve the message text from your app’s
Localizable.strings file. The value must contain the name of a key
in your strings file.
loc_args: Option<Vec<String>>An array of strings containing replacement values for variables in
your message text. Each %@ character in the string specified by
loc-key is replaced by a value from this array. The first item in
the array replaces the first instance of the %@ character in the
string, the second item replaces the second instance, and so on.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Alert
impl<'de> Deserialize<'de> for Alert
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for Alert
impl StructuralPartialEq for Alert
Auto Trait Implementations§
impl Freeze for Alert
impl RefUnwindSafe for Alert
impl Send for Alert
impl Sync for Alert
impl Unpin for Alert
impl UnwindSafe for Alert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.