A library for safe and effortless global and thread-local state management.
```rust extern crate state;
state::set(42u32);
assert_eq!(state::get::
See the documentation for more.
Include state
in your Cargo.toml
[dependencies]
:
toml
[dependencies]
state = "0.1"
Thread-local state management is not enabled by default. You can enable it via the "tls" feature:
toml
[dependencies]
state = { version = "0.1", features = ["tls"] }
State is licensed under either of the following, at your option: