pub enum BannerSeverity {
Info,
Success,
Warning,
Error,
}Expand description
Banner severity level. Drives the surface tint, glyph color, and
glyph shape. Apps with a “neutral” callout requirement should use
a Card instead.
Variants§
Info
Informational notice — accent-tinted background, circle glyph.
Success
Success / confirmation — green-tinted background, circle glyph.
Warning
Non-fatal warning — amber-tinted background, triangle glyph.
Error
Error / critical condition — red-tinted background, circle glyph.
Implementations§
Source§impl BannerSeverity
impl BannerSeverity
Sourcepub fn surface(self) -> SurfaceRole
pub fn surface(self) -> SurfaceRole
Surface-tint role for the banner strip background.
Sourcepub fn glyph_color(self, theme: &Theme) -> Color
pub fn glyph_color(self, theme: &Theme) -> Color
Foreground color for the leading severity glyph.
Trait Implementations§
Source§impl Clone for BannerSeverity
impl Clone for BannerSeverity
Source§fn clone(&self) -> BannerSeverity
fn clone(&self) -> BannerSeverity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BannerSeverity
Source§impl Debug for BannerSeverity
impl Debug for BannerSeverity
Source§impl<'de> Deserialize<'de> for BannerSeverity
impl<'de> Deserialize<'de> for BannerSeverity
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 BannerSeverity
Source§impl Hash for BannerSeverity
impl Hash for BannerSeverity
Source§impl PartialEq for BannerSeverity
impl PartialEq for BannerSeverity
Source§impl Serialize for BannerSeverity
impl Serialize for BannerSeverity
impl StructuralPartialEq for BannerSeverity
Auto Trait Implementations§
impl Freeze for BannerSeverity
impl RefUnwindSafe for BannerSeverity
impl Send for BannerSeverity
impl Sync for BannerSeverity
impl Unpin for BannerSeverity
impl UnsafeUnpin for BannerSeverity
impl UnwindSafe for BannerSeverity
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