summaryrefslogtreecommitdiff
path: root/src/useflag/mod.rs
blob: c367b1aa44d45a0623d1bd7b05b334749bc3d75c (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;

mod parsers;

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

#[derive(Clone, Debug, PartialEq, Eq, Hash, 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)
    }
}