insim_macros 0.1.0

Proc macros for insim_core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[derive(Debug, darling::FromVariant)]
#[darling(attributes(insim))]
pub(super) struct Variant {
    pub ident: syn::Ident,
    pub discriminant: Option<syn::Expr>,
    pub skip: Option<bool>,
}

impl Variant {
    pub(super) fn skip(&self) -> bool {
        self.skip.unwrap_or(false)
    }
}