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

#336 in Data structures

Download history 27223/week @ 2024-12-17 6881/week @ 2024-12-24 15109/week @ 2024-12-31 56427/week @ 2025-01-07 43290/week @ 2025-01-14 28278/week @ 2025-01-21 30443/week @ 2025-01-28 36493/week @ 2025-02-04 37452/week @ 2025-02-11 42468/week @ 2025-02-18 35065/week @ 2025-02-25 46267/week @ 2025-03-04 57341/week @ 2025-03-11 42435/week @ 2025-03-18 41329/week @ 2025-03-25 37422/week @ 2025-04-01

185,719 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!

No runtime deps