typemap_rev

Crates.iotypemap_rev
lib.rstypemap_rev
version0.3.0
sourcesrc
created_at2020-07-13 15:23:23.991321
updated_at2022-11-20 19:50:35.00268
descriptionA hashmap, but stores types as keys
homepagehttps://github.com/bdashore3/typemap_rev
repositoryhttps://github.com/bdashore3/typemap_rev
max_upload_size
id264724
size18,771
Brian Dashore (bdashore3)

documentation

README

TypeMap Revitalized

An updated version of the crate typemap which is a hashmap whose keys are defined by types.

Original code created by: Acdenissk

Crate created by: kingbri

Documentation

Documentation is located here

Example

use typemap_rev::{ TypeMap, TypeMapKey };

struct Number;

impl TypeMapKey for Number {
    type Value = i32;
}

let mut map = TypeMap::new();
map.insert::<Number>(42);

Help/Support

Join the Serenity-rs Discord server here: https://discord.gg/9X7vCus and feel free to ask your questions!

Commit count: 27

cargo fmt