state 0.1.1

A library for safe and effortless global and thread-local state management.
Documentation

State

A Rust library for safe and effortless global and thread-local state management.

extern crate state;

state::set(42u32);
assert_eq!(state::get::<u32>(), 42);

See the documentation for more.

Usage

Include state in your Cargo.toml [dependencies]:

[dependencies]
state = "0.1"

Thread-local state management is not enabled by default. You can enable it via the "tls" feature:

[dependencies]
state = { version = "0.1", features = ["tls"] }

License

State is licensed under either of the following, at your option: