drt-sc-derive 0.0.2

Dharitri smart contract API procedural macros
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::{attr_names::*, util::*};

pub struct EventAttribute {
    pub identifier: String,
}

impl EventAttribute {
    pub fn parse(attr: &syn::Attribute) -> Option<Self> {
        is_attr_one_string_arg(attr, ATTR_EVENT).map(|arg_str| EventAttribute {
            identifier: arg_str,
        })
    }
}