ffi-destruct 0.1.3

Generates destructors for structures that contain raw pointers in the FFI.
Documentation
1
2
3
4
5
6
7
8
9
10
/// Check if the attribute exist.
pub fn get_attribute(attrs: &Vec<syn::Attribute>, ident: &str) -> bool {
    let mut exist = false;
    for attr in attrs {
        if attr.path.is_ident(ident) {
            exist = true;
        }
    }
    exist
}