rust-bindgen
rust-bindgen copied to clipboard
Add support for custom attributes
This adds support for custom attributes:
ParseCallbacks::add_attributes(&self, info: &AttributeInfo<'_>) -> Vec<TokenStream>--with-attribute-custom <CUSTOM>--with-attribute-custom-struct <CUSTOM>--with-attribute-custom-enum <CUSTOM>--with-attribute-custom-union <CUSTOM>
The implementation is very similar to the custom derives functionality. One thing I am not sure about is returning Vec<TokenStream> instead of Vec<String>, but that seemed natural to me.
Fixes https://github.com/rust-lang/rust-bindgen/issues/2520