4 releases (1 stable)

1.0.0 Oct 12, 2024
0.1.2 Oct 10, 2024
0.1.1 Jun 22, 2023
0.1.0 Feb 17, 2022

#213 in Rust patterns

Download history 59709/week @ 2024-08-25 50450/week @ 2024-09-01 57541/week @ 2024-09-08 44776/week @ 2024-09-15 60013/week @ 2024-09-22 63213/week @ 2024-09-29 48412/week @ 2024-10-06 60208/week @ 2024-10-13 54617/week @ 2024-10-20 59467/week @ 2024-10-27 53513/week @ 2024-11-03 83726/week @ 2024-11-10 85526/week @ 2024-11-17 57295/week @ 2024-11-24 85604/week @ 2024-12-01 141964/week @ 2024-12-08

377,406 downloads per month
Used in 403 crates (6 directly)

Apache-2.0

5KB
85 lines

better_scoped_tls

This crate provides an opinionated version of scoped-tls.

Scoped thread local variables created by this crate will panic with a good message on usage without .set, like

You should perform this operation in the closure passed to `set` of better_scoped_tls::tests::TESTTLS

Syntax is exactly same to the original scoped-tls.


lib.rs:

Better scoped thread local storage.

Dependencies

~10KB