#[non_exhaustive]pub struct Alert {
pub title: String,
pub body: String,
pub sound: Option<String>,
}Expand description
An alert that comes with an update, or with a scheduled start: on iOS the device lights up, the Dynamic Island
expands (or, without one, the Lock Screen presentation shows as a banner), and an Apple Watch shows the title
and the body. On Android the notification alerts again with that revision, with its own title and text, where
the device offers it (alert in the capabilities); elsewhere the update is silent and the record reports
alert in degradedFeatures. More may come: build it with Alert::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.title: StringThe alert’s title, 1 to 120 characters.
body: StringThe alert’s body, 1 to 240 characters.
sound: Option<String>The sound of the alert on iOS: the file name of a sound in the application’s bundle or in its
Library/Sounds, such as chime.aiff, 1 to 64 of A-Za-z0-9._- beginning with a letter or a digit.
Without it the system plays its default sound. Android alerts with the sound of its channel, which is the
person’s choice, and the record names alert.sound.
Implementations§
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 Forget for Alert
impl Freeze for Alert
impl Move for Alert
impl RefUnwindSafe for Alert
impl Send for Alertwhere
RawVecInner: Send,
impl Sync for Alertwhere
RawVecInner: Sync,
impl Unpin for Alert
impl UnsafeUnpin for Alert
impl UnwindSafe for Alertwhere
RawVecInner: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.