Macro dyn_sized::derive_DynSized
[−]
[src]
macro_rules! derive_DynSized { ($Trait:ty) => { ... }; ($Trait:ty, $($args:tt)+ ) => { ... }; }
Derives the DynSized
trait for trait objects.
To use:
#[macro_use] extern crate dyn_sized; trait MyTrait {} derive_DynSized!(MyTrait); trait MyGenericTrait<'a, T: 'a> { fn foo(&'a self) -> T; } // type arguments for the impl go after the trait object type. derive_DynSized!(MyGenericTrait<'a, T>, 'a, T: 'a);