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

#194 in Rust patterns

Download history 83627/week @ 2024-12-04 195370/week @ 2024-12-11 126843/week @ 2024-12-18 56178/week @ 2024-12-25 146531/week @ 2025-01-01 249215/week @ 2025-01-08 209670/week @ 2025-01-15 162861/week @ 2025-01-22 146256/week @ 2025-01-29 163888/week @ 2025-02-05 167533/week @ 2025-02-12 202312/week @ 2025-02-19 220137/week @ 2025-02-26 220140/week @ 2025-03-05 207679/week @ 2025-03-12 204518/week @ 2025-03-19

894,617 downloads per month
Used in 418 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