Trait bindgen::callbacks::ParseCallbacks[][src]

pub trait ParseCallbacks: Debug + UnwindSafe {
    fn will_parse_macro(&self, _name: &str) -> MacroParsingBehavior { ... }
fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> { ... }
fn enum_variant_behavior(
        &self,
        _enum_name: Option<&str>,
        _original_variant_name: &str,
        _variant_value: EnumVariantValue
    ) -> Option<EnumVariantCustomBehavior> { ... }
fn enum_variant_name(
        &self,
        _enum_name: Option<&str>,
        _original_variant_name: &str,
        _variant_value: EnumVariantValue
    ) -> Option<String> { ... } }

A trait to allow configuring different kinds of types in different situations.

Provided Methods

This function will be run on every macro that is identified.

The integer kind an integer macro should have, given a name and the value of that macro, or None if you want the default to be chosen.

This function should return whether, given an enum variant name, and value, this enum variant will forcibly be a constant.

Allows to rename an enum variant, replacing _original_variant_name.

Implementors