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

#755 in Data structures

Download history 20966/week @ 2023-11-24 13900/week @ 2023-12-01 12598/week @ 2023-12-08 17460/week @ 2023-12-15 8219/week @ 2023-12-22 8558/week @ 2023-12-29 10379/week @ 2024-01-05 8996/week @ 2024-01-12 14882/week @ 2024-01-19 9139/week @ 2024-01-26 10558/week @ 2024-02-02 15681/week @ 2024-02-09 9419/week @ 2024-02-16 18348/week @ 2024-02-23 14551/week @ 2024-03-01 7095/week @ 2024-03-08

51,113 downloads per month
Used in 65 crates (10 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