Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
Show 14 fields pub char_bar_filled: char, pub char_bar_empty: char, pub char_bar_open: String, pub char_bar_close: String, pub threshold_usage_medium: f32, pub threshold_usage_high: f32, pub color_heading: Option<Color>, pub color_usage_low: Option<Color>, pub color_usage_medium: Option<Color>, pub color_usage_high: Option<Color>, pub color_usage_void: Option<Color>, pub color_bar_empty: Option<Color>, pub bar_width: usize, pub columns: Vec<ColumnType>,
}
Expand description

Visual policy used by the table renderer.

Fields§

§char_bar_filled: char

Glyph used for filled bar cells.

§char_bar_empty: char

Glyph used for empty bar cells.

§char_bar_open: String

Optional opening decoration for the bar.

§char_bar_close: String

Optional closing decoration for the bar.

§threshold_usage_medium: f32

Percentage at which usage becomes medium severity.

§threshold_usage_high: f32

Percentage at which usage becomes high severity.

§color_heading: Option<Color>

Heading color, if color output is enabled.

§color_usage_low: Option<Color>

Low-usage color.

§color_usage_medium: Option<Color>

Medium-usage color.

§color_usage_high: Option<Color>

High-usage color.

§color_usage_void: Option<Color>

Color for records without a usable percentage.

§color_bar_empty: Option<Color>

Color for unfilled usage-bar cells.

§bar_width: usize

Number of cells in a usage bar.

§columns: Vec<ColumnType>

Columns rendered from left to right.

Implementations§

Source§

impl Theme

Source

pub fn from_palette(palette: &Palette) -> Self

Construct the renderer policy for one palette.

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnsafeUnpin for Theme

§

impl UnwindSafe for Theme

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.