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

#209 in Rust patterns

Download history 58879/week @ 2024-10-26 53568/week @ 2024-11-02 79236/week @ 2024-11-09 87867/week @ 2024-11-16 58852/week @ 2024-11-23 81400/week @ 2024-11-30 146445/week @ 2024-12-07 184416/week @ 2024-12-14 55384/week @ 2024-12-21 95220/week @ 2024-12-28 217826/week @ 2025-01-04 247607/week @ 2025-01-11 173937/week @ 2025-01-18 151550/week @ 2025-01-25 155507/week @ 2025-02-01 174841/week @ 2025-02-08

700,947 downloads per month
Used in 408 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