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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Internal `cfg` macros that bundle a feature gate with its matching docs.rs
//! `doc(cfg(...))` badge, so each storage-tier predicate lives in exactly one
//! place. Wrapping items in one of these is equivalent to writing both
//! `#[cfg(PRED)]` and `#[cfg_attr(docsrs, doc(cfg(PRED)))]` on each — but the
//! predicate cannot drift between the two (the source of past tier bugs), and a
//! new item can never silently omit its docs.rs badge.
//!
//! They wrap *items* (`mod` / `use` / `fn` / `struct` / `enum` / `impl` / `const`
//! / `type`) and methods. Struct fields, function parameters, `match` arms and
//! statements are not items, so a handful of those keep an explicit `#[cfg(...)]`.
// Which helpers are invoked depends on the active feature tier — e.g. `cfg_stats`
// is only used inside the heap-gated `endpoint` module, so it is dead in a
// `heapless`-only build.
// Items that need a heap allocator — the dynamic-storage (Endpoint) tier:
// `alloc`, `std`, or the `no-atomic` (portable-atomic) tier. Mirrors the
// `NameInner` heap arms; deliberately excludes `heapless`.
// Items available on *any* storage tier that can hold a `Name`: the heap tiers
// (`alloc` / `std` / `no-atomic`) plus fixed-capacity `heapless`.
// Items gated on the `stats` counter feature.