banner

Struct Style

Source
pub struct Style {
    pub no_color_codes: bool,
    pub border: BorderStyle,
    pub h1: ElementStyle,
    pub h2: ElementStyle,
    pub h3: ElementStyle,
    pub text: ElementStyle,
}
Expand description

Defines a banner style.

Fields§

§no_color_codes: bool

Used to suppress color codes. Setting this flag to true will omit color codes from output.

§border: BorderStyle

The border color.

§h1: ElementStyle

Defines the style for H1 elements.

§h2: ElementStyle

Defines the style for H2 elements.

§h3: ElementStyle

Defines the style for H3 elements.

§text: ElementStyle

Defines the style for text elements.

Implementations§

Source§

impl Style

Source

pub fn new() -> Style

Returns a new Style.

Source

pub fn header_style(self: &Style, level: &HeaderLevel) -> &ElementStyle

Returns the element style for a header level.

§Arguments
  • self - The parent style to retrieve the element style from.
  • level - The header level used to identify the requested element style.

Auto Trait Implementations§

§

impl Freeze for Style

§

impl RefUnwindSafe for Style

§

impl Send for Style

§

impl Sync for Style

§

impl Unpin for Style

§

impl UnwindSafe for Style

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.