pub struct Notification {
pub status: NotificationStatus,
pub title: String,
pub description: Option<String>,
}Expand description
A transient message shown after a mutation.
Fields§
§status: NotificationStatus§title: String§description: Option<String>Supporting line under the title; None keeps the cookie wire format so
older cookies still decode.
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
Auto Trait Implementations§
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> 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