pub struct Notification {
pub status: NotificationStatus,
pub title: String,
pub description: Option<String>,
pub actions: Vec<NotificationAction>,
}Expand description
A message for a panel user: flashed as a toast after a write, or stored for the bell with
Notifications::send.
Fields§
§status: NotificationStatus§title: String§description: Option<String>Supporting line under the title; None keeps the cookie wire format so
older cookies still decode.
actions: Vec<NotificationAction>The links under the text, in the order they were added.
Implementations§
Source§impl Notification
impl Notification
pub fn success(title: impl Into<String>) -> Self
pub fn error(title: impl Into<String>) -> Self
pub fn info(title: impl Into<String>) -> Self
pub fn warning(title: impl Into<String>) -> Self
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Attach the supporting line under the title.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§impl Debug for Notification
impl Debug for Notification
Source§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Notification
Source§impl PartialEq for Notification
impl PartialEq for Notification
Source§impl Serialize for Notification
impl Serialize for Notification
impl StructuralPartialEq for Notification
Auto Trait Implementations§
impl Forget for Notification
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
Blanket Implementations§
Source§impl<T> Assign<Json<T>> for Twhere
T: Serialize,
impl<T> Assign<Json<T>> for Twhere
T: Serialize,
Source§fn into_assignment(self) -> Assignment<Json<T>>
fn into_assignment(self) -> Assignment<Json<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.