pub enum ToastStyle {
Info,
Success,
Warning,
Error,
}Expand description
Style variants for toast notifications
Variants§
Info
Default informational style (cyan border)
Success
Success style (green border)
Warning
Warning style (yellow border)
Error
Error style (red border)
Implementations§
Source§impl ToastStyle
impl ToastStyle
Sourcepub fn border_color(&self) -> Color
pub fn border_color(&self) -> Color
Get the border color for this style
Sourcepub fn from_message(message: &str) -> Self
pub fn from_message(message: &str) -> Self
Auto-detect style from message content
Trait Implementations§
Source§impl Clone for ToastStyle
impl Clone for ToastStyle
Source§fn clone(&self) -> ToastStyle
fn clone(&self) -> ToastStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToastStyle
impl Debug for ToastStyle
Source§impl Default for ToastStyle
impl Default for ToastStyle
Source§fn default() -> ToastStyle
fn default() -> ToastStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for ToastStyle
impl PartialEq for ToastStyle
impl Copy for ToastStyle
impl Eq for ToastStyle
impl StructuralPartialEq for ToastStyle
Auto Trait Implementations§
impl Freeze for ToastStyle
impl RefUnwindSafe for ToastStyle
impl Send for ToastStyle
impl Sync for ToastStyle
impl Unpin for ToastStyle
impl UnwindSafe for ToastStyle
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more