2019-09-30 12:10:35 +00:00
|
|
|
use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
|
|
|
|
|
|
|
|
use ansi_term::{Color, Style};
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
|
|
pub struct RustConfig<'a> {
|
|
|
|
pub symbol: SegmentConfig<'a>,
|
|
|
|
pub version: SegmentConfig<'a>,
|
|
|
|
pub style: Style,
|
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
|
|
|
|
fn new() -> Self {
|
|
|
|
RustConfig {
|
2019-10-06 01:46:14 +00:00
|
|
|
symbol: SegmentConfig::new("🦀 "),
|
|
|
|
version: SegmentConfig::default(),
|
2019-09-30 12:10:35 +00:00
|
|
|
style: Color::Red.bold(),
|
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|