hexga_generational 0.0.11-beta.56

GenVec, ideal for MAS (Multi-Agent System), where each agent can be removed at any time and has references to other agents.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use hexga_generational::prelude::*;

fn main()
{
    let mut map: GenHashMap<String, i32> = GenHashMap::new();
    assert!(map.insert("abc".to_owned(), 1).1.is_none());
    assert!(map.insert("abc".to_owned(), 2).1.is_some());
    dbg!(map);

    let mut map: GenBTreeMap<String, i32> = GenBTreeMap::new();
    assert!(map.insert("abc".to_owned(), 1).1.is_none());
    assert!(map.insert("abc".to_owned(), 2).1.is_some());
    dbg!(map);
}