trait-map-derive 0.1.2

Derive the TraitMapEntry trait for trait_map crate
Documentation
use trait_map_derive::TraitMapEntry;

trait MyTrait {
  fn test(&self) -> u32;
}

#[derive(TraitMapEntry)]
#[trait_map]
#[trait_map(MyTrait, "literal", true, value = "5")]
struct MyStruct {
  value: u32,
}

impl MyTrait for MyStruct {
  fn test(&self) -> u32 {
    self.value
  }
}

fn main() {}