Trait bindgen::callbacks::ParseCallbacks
[−]
[src]
pub trait ParseCallbacks: Debug + UnwindSafe { fn parsed_macro(&self, _name: &str) { ... } fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> { ... } fn enum_variant_behavior(
&self,
_enum_name: Option<&str>,
_variant_name: &str,
_variant_value: EnumVariantValue
) -> Option<EnumVariantCustomBehavior> { ... } }
A trait to allow configuring different kinds of types in different situations.
Provided Methods
fn parsed_macro(&self, _name: &str)
This function will be run on every macro that is identified
fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind>
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.
fn enum_variant_behavior(
&self,
_enum_name: Option<&str>,
_variant_name: &str,
_variant_value: EnumVariantValue
) -> Option<EnumVariantCustomBehavior>
&self,
_enum_name: Option<&str>,
_variant_name: &str,
_variant_value: EnumVariantValue
) -> Option<EnumVariantCustomBehavior>
This function should return whether, given the a given enum variant name, and value, returns whether this enum variant will forcibly be a constant.