This crate offers typemaps that restrict a given type in their
trait and therefore offer additional trait implementations such as Clone
and PartialEq
.
```rust use traitboundtypemap::{CloneTypeMap, TypeMapTrait, TypeMapKey};
pub struct MyStruct { a: u8, b: String, }
pub struct MyStructKey;
impl TypeMapKey for MyStructKey { type Value = MyStruct; }
fn main() {
let mut map = CloneTypeMap::new();
let value = MyStruct {a: 5, b: String::from("Hello World")};
map.insert::
Apache-2.0