interoptopus_proc_impl 0.16.0-alpha.15

Macros to produce Interoptopus item info.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use syn::Field;

pub struct FieldAttrs {
    pub has_runtime_attr: bool,
}

impl FieldAttrs {
    pub fn from_field(field: &Field) -> Self {
        let has_runtime_attr = field.attrs.iter().any(|attr| attr.path().is_ident("runtime"));
        Self { has_runtime_attr }
    }
}