Registry / utility / scoped-tls

scoped-tls

JSON →
library1.0.1rscratesunverified

Library implementation of the standard library's old `scoped_thread_local!` macro for providing scoped access to thread local storage (TLS) so any type can be stored into TLS.

# Cargo.toml [dependencies] scoped-tls = "1.0.1"
INSTALL
IMPORT
SIG · SCOPED-TLS
S
scoped-tls
utilityrustv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

scoped_thread_local
use scoped_tls::scoped_thread_local;

Use scoped thread-local storage.

use scoped_tls::scoped_thread_local; scoped_thread_local!(static FOO: u32); fn main() { FOO.set(&42, || { println!("{}", FOO.with(|v| *v)); }); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
scoped-tls — cargo add scoped-tls · libregistry