HeaderConfig

Struct HeaderConfig 

Source
pub struct HeaderConfig {
Show 13 fields pub label_angle: Option<f64>, pub label_color: Option<String>, pub label_font: Option<String>, pub label_font_size: Option<f64>, pub label_limit: Option<f64>, pub title_anchor: Option<String>, pub title_angle: Option<f64>, pub title_baseline: Option<TextBaseline>, pub title_color: Option<String>, pub title_font: Option<String>, pub title_font_size: Option<f64>, pub title_font_weight: Option<FontWeight>, pub title_limit: Option<f64>,
}
Expand description

Header configuration, which determines default properties for all header. For a full list of header configuration options, please see the corresponding section of in the header documentation.

Fields§

§label_angle: Option<f64>

The rotation angle of the header labels.

Default value: 0.

§label_color: Option<String>

The color of the header label, can be in hex color code or regular color name.

§label_font: Option<String>

The font of the header label.

§label_font_size: Option<f64>

The font size of the header label, in pixels.

§label_limit: Option<f64>

The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.

Default value: 0, indicating no limit

§title_anchor: Option<String>

The anchor position for placing the title. One of "start", "middle", or "end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.

Default value: "middle" for single and layered views. "start" for other composite views.

Note: For now, anchor is only customizable only for single and layered views. For other composite views, anchor is always "start".

§title_angle: Option<f64>

The rotation angle of the header title.

Default value: 0.

§title_baseline: Option<TextBaseline>

Vertical text baseline for the header title. One of "top", "bottom", "middle".

Default value: "middle"

§title_color: Option<String>

Color of the header title, can be in hex color code or regular color name.

§title_font: Option<String>

Font of the header title. (e.g., "Helvetica Neue").

§title_font_size: Option<f64>

Font size of the header title.

§title_font_weight: Option<FontWeight>

Font weight of the header title. This can be either a string (e.g "bold", "normal") or a number (100, 200, 300, …, 900 where "normal" = 400 and "bold" = 700).

§title_limit: Option<f64>

The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.

Default value: 0, indicating no limit

Trait Implementations§

Source§

impl Debug for HeaderConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HeaderConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HeaderConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,