summaryrefslogtreecommitdiff
path: root/bindgen/callbacks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen/callbacks.rs')
-rw-r--r--bindgen/callbacks.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/bindgen/callbacks.rs b/bindgen/callbacks.rs
index fb84c8c3..bebd6978 100644
--- a/bindgen/callbacks.rs
+++ b/bindgen/callbacks.rs
@@ -105,7 +105,15 @@ pub trait ParseCallbacks: fmt::Debug {
///
/// If no additional attributes are wanted, this function should return an
/// empty `Vec`.
- fn add_derives(&self, _name: &str) -> Vec<String> {
+ fn add_derives(&self, _info: &DeriveInfo<'_>) -> Vec<String> {
vec![]
}
}
+
+/// Relevant information about a type to which new derive attributes will be added using
+/// [`ParseCallbacks::add_derives`].
+#[non_exhaustive]
+pub struct DeriveInfo<'a> {
+ /// The name of the type.
+ pub name: &'a str,
+}