1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// Register multiple context types on a builder at once.
///
/// ```rust,ignore
/// let mut builder = dcontext::RegistryBuilder::new();
/// dcontext::register_contexts!(builder, {
/// "trace_context" => TraceContext,
/// "feature_flags" => FeatureFlags,
/// "auth_info" => AuthInfo,
/// });
/// dcontext::initialize(builder);
/// ```
/// Enter a scope, set values, execute a block, and auto-revert.
///
/// ```rust,ignore
/// dcontext::with_scope! {
/// "trace_id" => TraceId::new(),
/// "flags" => Flags { debug: true },
/// => {
/// do_work();
/// }
/// }
/// ```