pub struct UiConfig {
pub theme: String,
pub show_ip: bool,
pub show_uptime: bool,
pub card_layout: String,
pub border_style: String,
}Expand description
Visual / theme settings.
Fields§
§theme: StringOne of: default, dracula, nord, gruvbox.
show_ip: bool§show_uptime: bool§card_layout: StringOne of: grid, list.
border_style: StringOne of: rounded, plain, double.
Implementations§
Source§impl UiConfig
impl UiConfig
Sourcepub fn available_themes() -> &'static [&'static str]
pub fn available_themes() -> &'static [&'static str]
Returns the list of all available built-in theme names.
These names correspond to the built-in themes of the TUI frontend.
Sourcepub fn is_valid_theme(name: &str) -> bool
pub fn is_valid_theme(name: &str) -> bool
Checks if the given theme name is valid.
§Examples
assert!(UiConfig::is_valid_theme("dracula"));
assert!(!UiConfig::is_valid_theme("unknown"));Trait Implementations§
Source§impl<'de> Deserialize<'de> for UiConfig
impl<'de> Deserialize<'de> for UiConfig
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
Auto Trait Implementations§
impl Freeze for UiConfig
impl RefUnwindSafe for UiConfig
impl Send for UiConfig
impl Sync for UiConfig
impl Unpin for UiConfig
impl UnsafeUnpin for UiConfig
impl UnwindSafe for UiConfig
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