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

#210 in Rust patterns

Download history 92508/week @ 2024-11-15 63598/week @ 2024-11-22 74593/week @ 2024-11-29 116563/week @ 2024-12-06 205698/week @ 2024-12-13 65959/week @ 2024-12-20 74916/week @ 2024-12-27 200098/week @ 2025-01-03 253429/week @ 2025-01-10 192903/week @ 2025-01-17 149808/week @ 2025-01-24 154059/week @ 2025-01-31 169622/week @ 2025-02-07 166145/week @ 2025-02-14 226560/week @ 2025-02-21 170128/week @ 2025-02-28

765,494 downloads per month
Used in 416 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