#type #typemap

typemap_rev

A hashmap, but stores types as keys

6 releases

0.1.5 Apr 9, 2021
0.1.4 Nov 13, 2020
0.1.3 Jul 16, 2020

#1 in #typemap

Download history 2335/week @ 2021-05-29 2392/week @ 2021-06-05 3100/week @ 2021-06-12 2226/week @ 2021-06-19 3163/week @ 2021-06-26 3067/week @ 2021-07-03 2695/week @ 2021-07-10 2136/week @ 2021-07-17 2253/week @ 2021-07-24 2396/week @ 2021-07-31 2328/week @ 2021-08-07 2572/week @ 2021-08-14 2186/week @ 2021-08-21 2085/week @ 2021-08-28 2032/week @ 2021-09-04 3759/week @ 2021-09-11

10,084 downloads per month
Used in 22 crates (5 directly)

ISC license

12KB
226 lines

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!


lib.rs:

A hashmap whose keys are defined by types.

No runtime deps