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
//! [`AsciiLetter`] — single-ASCII-letter newtype shared between the
//! `single_letter_*` rules' allow-list configuration knobs. Encoding
//! the "ASCII alphabetic" invariant in the type system retires the
//! convention-only `#[serde(deserialize_with = "deserialize_ascii_letters")]`
//! attribute the rules used to carry on their `Vec<char>` fields.
/// TOML-flavoured type label for [`AsciiLetter`], surfaced by
/// `tools/gen-docs` in the per-rule field-type column. Sourced here
/// — next to the type definition — so the label is the type's own
/// property rather than a hard-coded match arm in the doc generator.
///
/// `char` keeps the broader `single-character string` label for the
/// codepoint-shaped fields that genuinely accept any Unicode
/// character (`unicode_ellipsis_*::extra_flagged_chars`); [`AsciiLetter`]'s
/// label is strictly narrower because every value satisfies
/// `char::is_ascii_alphabetic`.
pub const TOML_LABEL: &str = "single-letter string";
/// A single ASCII letter (`a`..=`z` or `A`..=`Z`).
///
/// Deserialises from a TOML single-character string and rejects any
/// non-alphabetic codepoint with a clear error message at
/// config-parse time. The `single_letter_*` rules use
/// `Vec<AsciiLetter>` for their `extra_allowed_idents` /
/// `extra_denied_idents` knobs so the invariant the rule
/// documentation advertises ("each entry is a single ASCII letter,
/// `a`-`z`, `A`-`Z`") is part of the type rather than carried by a
/// `#[serde(deserialize_with = "...")]` attribute by convention.
pub ;