8 releases

0.3.0 Nov 20, 2022
0.2.0 Aug 30, 2022
0.1.5 Apr 9, 2021
0.1.4 Nov 13, 2020
0.1.3 Jul 16, 2020

#421 in Data structures

Download history 43893/week @ 2024-11-08 85606/week @ 2024-11-15 26545/week @ 2024-11-22 44446/week @ 2024-11-29 46700/week @ 2024-12-06 51798/week @ 2024-12-13 8723/week @ 2024-12-20 10976/week @ 2024-12-27 39144/week @ 2025-01-03 56210/week @ 2025-01-10 31023/week @ 2025-01-17 28357/week @ 2025-01-24 32994/week @ 2025-01-31 39489/week @ 2025-02-07 13509/week @ 2025-02-14

94,775 downloads per month
Used in 97 crates (14 directly)

ISC license

18KB
388 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