Custom Derive for the boxext::Zero
trait
Add #[derive(Zero)]
on your types to automatically derive the boxext::Zero
trait.
Only structs aggregating types implementing the boxext::Zero
trait are valid to use this with.
Example
extern crate boxext;
extern crate boxext_derive;
use BoxExt;
// #[derive(Zero)]
// ^ the trait `boxext::Zero` is not implemented for `std::boxed::Box<Foo>`
// struct Bar {
// a: usize,
// b: Box<Foo>,
// }