3 releases (1 stable)

1.0.0 Jul 6, 2020
0.10.0 Jul 3, 2020
0.9.0 Nov 19, 2019

#51 in #thread-local

Download history 37/week @ 2023-12-17 31/week @ 2023-12-24 2/week @ 2023-12-31 30/week @ 2024-01-07 31/week @ 2024-01-14 11/week @ 2024-01-21 4/week @ 2024-01-28 25/week @ 2024-02-04 37/week @ 2024-02-11 45/week @ 2024-02-18 92/week @ 2024-02-25 75/week @ 2024-03-03 63/week @ 2024-03-10 65/week @ 2024-03-17 85/week @ 2024-03-24 155/week @ 2024-03-31

380 downloads per month
Used in 14 crates (via illicit)

MIT/Apache

5KB
75 lines

illicit

The illicit crate provides type-indexed thread-local environments.

[1.0.0] - 2020-07-03

Commiting to the current API for future 1.* releases.

[0.10.0] - 2020-07-03

Added

  • impl From<Snapshot> for Layer allows reusing collected snapshots.

Removed

  • #![feature(track_caller)] (requires >= nightly-2020-07-02 until 1.46 is beta/stable)
  • Support for owned/cloned arguments in from_env.

Changed

  • EnvSnapshot renamed to Snapshot.
  • Env::get, Env::expect, Env::snapshot moved to get, expect, free functions and Snapshot::get associated function.
  • Env renamed to Layer.
  • Layer::with renamed to Layer::offer.
  • from_env requires at least one argument.
  • from_env adds "Environment Expectations" doc comment to expanded function.
  • Additions to the environment track their location with std::panic::Location.

[0.9.2] - 2019-12-25

Changed

  • Microbenchmark times were improved.

[0.9.1] - 2019-11-22

Fixed

  • Relaxed intra-crate doc lint to allow docs.rs publish to succeed.

[0.9.0] - 2019-11-19

Initial release which consists mostly of code extracted from topo.

Added

  • Env, EnvSnapshot, from_env.

Changed

  • Env implements Debug.
  • expect prints the current environment as a stack of layers on failure.

Removed

  • Scope
  • root! { ... }

Dependencies

~1.5MB
~34K SLoC