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

#279 in Rust patterns

Download history 172423/week @ 2025-12-18 66486/week @ 2025-12-25 167303/week @ 2026-01-01 318933/week @ 2026-01-08 351490/week @ 2026-01-15 436325/week @ 2026-01-22 383489/week @ 2026-01-29 291980/week @ 2026-02-05 282287/week @ 2026-02-12 434924/week @ 2026-02-19 445879/week @ 2026-02-26 484332/week @ 2026-03-05 447669/week @ 2026-03-12 225833/week @ 2026-03-19 220240/week @ 2026-03-26 175505/week @ 2026-04-02

1,157,109 downloads per month
Used in 612 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