1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-05-31 07:30:52 +00:00
starship/src/configs/kubernetes.rs
2022-04-01 17:14:05 +02:00

26 lines
704 B
Rust

use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
#[serde(default)]
pub struct KubernetesConfig<'a> {
pub symbol: &'a str,
pub format: &'a str,
pub style: &'a str,
pub disabled: bool,
pub context_aliases: HashMap<String, &'a str>,
}
impl<'a> Default for KubernetesConfig<'a> {
fn default() -> Self {
KubernetesConfig {
symbol: "",
format: "[$symbol$context( \\($namespace\\))]($style) in ",
style: "cyan bold",
disabled: true,
context_aliases: HashMap::new(),
}
}
}