From ccb9d16e5dbe965e5a604e1cb402cd3bc7de0df5 Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Mon, 5 Dec 2016 07:46:22 -0800 Subject: Add a ShareMap across contexts The context now exposes, through the Client, a `data` field, which can be accessed safely across contexts. This allows for a custom "shared state" without the need for (ab)using lazy-static.rs. Refer to example 06 for an example on how to use shared data. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index ca4a2fe..29237da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -145,6 +145,7 @@ extern crate hyper; extern crate multipart; extern crate serde_json; extern crate time; +extern crate typemap; extern crate websocket; #[cfg(feature="voice")] -- cgit v1.2.3