i3status_rs/formatting/formatter/
flag.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

pub const DEFAULT_FLAG_FORMATTER: FlagFormatter = FlagFormatter;

#[derive(Debug)]
pub struct FlagFormatter;

impl Formatter for FlagFormatter {
    fn format(&self, val: &Value, _config: &SharedConfig) -> Result<String, FormatError> {
        match val {
            Value::Flag => Ok(String::new()),
            _ => {
                unreachable!()
            }
        }
    }
}