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
30
31
32
mod traits;
pub use traits::*;

pub use helpers::*;

#[doc(hidden)]
pub use derive::{Annotation, AnnotationEnumValue};

#[cfg(any(feature = "annotation_reader"))]
pub use derive::{__get_annotation, __has_annotation, generate_reader};

#[cfg(any(feature = "annotation_reader"))]
#[macro_export]
macro_rules! get_annotation {
    ($class: ident, $annotation: ident) => {
        $crate::__get_annotation!($class, $annotation)
    };
    ($class: ident :: $prop: ident, $annotation: ident) => {
        $crate::__get_annotation!($class, $annotation, $prop)
    };
}

#[cfg(any(feature = "annotation_reader"))]
#[macro_export]
macro_rules! has_annotation {
    ($class: ident :: $prop: ident, $annotation: ident) => {
        $crate::__has_annotation!($class, $annotation, $prop)
    };
    ($class: ident, $annotation: ident) => {
        $crate::__has_annotation!($class, $annotation)
    };
}