gom 0.1.7

A simple Rust global object manager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use gom::*;

const VEC: &str = id!(Vec);
const ID: &str = id!(@VEC.Bar);

fn main() {
    Registry::register(ID, vec![1, 2, 3]).unwrap();

    Registry::<Vec<i32>>::apply(ID, |v| {
        v.push(4);
    });

    let v = Registry::<Vec<i32>>::remove(ID);
    println!("{:?}", v);
}