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

#445 in Data structures

Download history 10439/week @ 2024-01-06 10156/week @ 2024-01-13 13854/week @ 2024-01-20 9939/week @ 2024-01-27 11330/week @ 2024-02-03 13711/week @ 2024-02-10 10335/week @ 2024-02-17 19653/week @ 2024-02-24 12875/week @ 2024-03-02 13818/week @ 2024-03-09 13241/week @ 2024-03-16 16883/week @ 2024-03-23 22207/week @ 2024-03-30 10103/week @ 2024-04-06 12103/week @ 2024-04-13 10933/week @ 2024-04-20

61,192 downloads per month
Used in 69 crates (12 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