[][src]Struct badgen::Style

pub struct Style<'a> {
    pub height: u16,
    pub border_radius: u16,
    pub background: Color<'a>,
    pub text_color: Color<'a>,
    pub text_spacing: f32,
    pub text_shadow_color: Color<'a>,
    pub text_shadow_opacity: Opacity<'a>,
    pub text_shadow_offset: u16,
    pub label_background: Option<Color<'a>>,
    pub label_text_color: Option<Color<'a>>,
    pub gradient: Option<Gradient<'a>>,
    // some fields omitted
}

A badge style.

Fields

height: u16

The height of the badge.

border_radius: u16

The border radius of the badge.

background: Color<'a>

The background color of the badge.

This is specific to the status.

text_color: Color<'a>

The text color of the badge.

text_spacing: f32

Spacing between letters.

text_shadow_color: Color<'a>

The text shadow color of the badge.

text_shadow_opacity: Opacity<'a>

The text shadow opacity of the badge.

text_shadow_offset: u16

The text shadow offset of the badge.

label_background: Option<Color<'a>>

The label background color of the badge.

label_text_color: Option<Color<'a>>

The label text color of the badge.

If not None, defaults to text_color.

gradient: Option<Gradient<'a>>

The background gradient of the badge.

Implementations

impl<'a> Style<'a>[src]

pub const fn classic() -> Self[src]

A classic badge style.

pub const fn flat() -> Self[src]

A flat badge style.

Trait Implementations

impl<'a> Clone for Style<'a>[src]

impl<'a> Debug for Style<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Style<'a>

impl<'a> Send for Style<'a>

impl<'a> Sync for Style<'a>

impl<'a> Unpin for Style<'a>

impl<'a> UnwindSafe for Style<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.