Crates.io | illicit |
lib.rs | illicit |
version | 1.1.2 |
source | src |
created_at | 2019-11-19 02:15:59.293686 |
updated_at | 2021-02-02 04:03:33.193591 |
description | An implicit thread-local environment which is indexed by type. |
homepage | https://moxie.rs |
repository | https://github.com/anp/moxie.git |
max_upload_size | |
id | 182359 |
size | 24,188 |
The illicit crate provides type-indexed thread-local environments.
get()
impls Debug
.AsContext
trait offers a shorthand for adding a single type to the local environment.Commiting to the current API for future 1.*
releases.
impl From<Snapshot> for Layer
allows reusing collected snapshots.#![feature(track_caller)]
(requires >= nightly-2020-07-02 until 1.46 is beta/stable)from_env
.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.std::panic::Location
.Initial release which consists mostly of code extracted from topo
.
Env
, EnvSnapshot
, from_env
.Env
implements Debug
.expect
prints the current environment as a stack of layers on failure.Scope
root! { ... }