summaryrefslogtreecommitdiff
path: root/src/useflag/mod.rs
blob: 1f814eb3389cffebf7e5efb565c3be9d943a35fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use core::fmt;

use get::Get;

pub mod parsers;

#[derive(Clone, Debug, PartialEq, Eq, Get)]
pub struct UseFlag(#[get(method = "name", kind = "deref")] String);

#[derive(Clone, Debug, PartialEq, Eq, Get)]
pub struct IUseFlag {
    default: bool,
    flag: UseFlag,
}

impl fmt::Display for UseFlag {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.0)
    }
}