5 releases (2 stable)

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

#252 in Rust patterns

Download history 219394/week @ 2025-03-06 200895/week @ 2025-03-13 206205/week @ 2025-03-20 208955/week @ 2025-03-27 204078/week @ 2025-04-03 214733/week @ 2025-04-10 212920/week @ 2025-04-17 189655/week @ 2025-04-24 162719/week @ 2025-05-01 193829/week @ 2025-05-08 200539/week @ 2025-05-15 179780/week @ 2025-05-22 192345/week @ 2025-05-29 161743/week @ 2025-06-05 238833/week @ 2025-06-12 178500/week @ 2025-06-19

811,890 downloads per month
Used in 446 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.

Dependencies

~10KB