diff options
author | Porter Smith <flowbish@gmail.com> | 2018-11-28 14:45:08 -0800 |
---|---|---|
committer | Porter Smith <flowbish@gmail.com> | 2018-11-28 15:07:27 -0800 |
commit | 94698e02a6c346ed20a2bf6d4217be9e308ddb15 (patch) | |
tree | 9f073ccdb84e0735758e1fdd47155e417cb0aaa7 /src/codegen/impl_debug.rs | |
parent | adfc52a02c8d53878a6d9c19373cc4470e423aeb (diff) |
Add source annotation to express explicit derives for a type.
This allows for explicit selection of which traits are derived for a
type, e.g. deriving custom traits on particular types that need it.
Example usage:
```C++
/// <div rustbindgen derive="Clone"></div>
/// <div rustbindgen derive="MyDerivableTrait"></div>
struct foo { ... };
```
generates into
```Rust
#[derive(Clone,MyDerivableTrait)]
struct foo { ... }
```
Diffstat (limited to 'src/codegen/impl_debug.rs')
0 files changed, 0 insertions, 0 deletions