1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#![deny(clippy::pedantic, unused_imports)]
#![allow(
dead_code,
unstable_name_collisions,
clippy::missing_errors_doc,
clippy::missing_panics_doc
)]
#![feature(impl_trait_in_assoc_type)]
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)
}
}
|