DynAny

Derive Macro DynAny 

Source
#[derive(DynAny)]
{
    // Attributes available to this derive:
    #[dyn_any_derive]
}
Expand description

Derives an implementation for the DynAny trait.

§Note

Currently only works with struct inputs.

§Example

§Struct

#[derive(DynAny)]
pub struct Color<'a, 'b> {
    r: &'a u8,
    g: &'b u8,
    b: &'a u8,
}


// Generated Impl

// impl<'dyn_any> StaticType for Color<'dyn_any, 'dyn_any> {
//     type Static = Color<'static, 'static>;
// }