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
//! Icon vocabulary.
//!
//! snora supports icons from multiple sources. Each source is gated behind
//! a Cargo feature so that unused icon backends are eliminated at compile
//! time (DCE) — no bundled asset blob you aren't using.
//!
//! | Source | Feature flag | Variant |
//! |--------|--------------|---------|
//! | Plain text (glyph / emoji) | always available | [`Icon::Text`] |
//! | Lucide icon set | `lucide-icons` | [`Icon::Lucide`] |
//! | Custom SVG file | `svg-icons` | [`Icon::Svg`] |
//!
//! When a feature is disabled, its variant does not exist in the enum at
//! all — the compiler will refuse code that references it, so there are no
//! runtime "unimplemented!" paths.
//!
//! # Fallback ergonomics
//!
//! `Icon` accepts `&str` / `String` conversions directly so that icon fields
//! in user code can degrade gracefully even with all features disabled:
//!
//! ```rust
//! # use snora_core::Icon;
//! let icon: Icon = "★".into(); // always works
//! let icon: Icon = String::from("★").into();
//! ```