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
//! `fn(g: &mut quickcheck::Gen) -> T` helpers — one per descriptor type —
//! referenced via container-level `#[quickcheck(arbitrary = "…")]` on each type's
//! `quickcheck_richderive::Arbitrary` derive.
//!
//! Split across three cluster files for parallel ownership (same axis as
//! [`arbitrary_impls`](crate::arbitrary_impls)):
//!
//! strings.rs — open string enums w/ `Other(SmolStr)` (codec×3, container,
//! subtitle::Format, audio open formats).
//! coded.rs — closed FFmpeg-coded enums w/ `from_u32` + colour / frame /
//! pixel-format / disposition structs and enums.
//! composite.rs — audio composite metadata (Loudness/Fingerprint/CoverArt/Tags),
//! capture (Device/GeoLocation), lang::Language.
//!
//! These helpers do **not** route through `arbitrary::Unstructured` — they
//! consume `quickcheck::Gen` directly. The two `Arbitrary` features
//! (`arbitrary` and `quickcheck`) are independent: enable either one alone.
/// Emit one `pub(crate) fn $name(g) -> $ty` for an **open string enum** —
/// 50/50 a curated slug or an arbitrary string, both through `FromStr`.
///
/// `FromStr` is the canonicalising constructor: a named slug yields the
/// named variant, only a non-named slug yields `Other`. Routing the
/// arbitrary-string branch through it too (rather than `Other(SmolStr)`
/// directly) guarantees a string equal to a named slug becomes that named
/// variant — never a malformed `Other("h264")` that serde would
/// canonicalise to `H264` on the round trip. An arbitrary string is
/// virtually never a named slug, so the `Other` arm stays well-covered.
pub
pub
pub
/// Picks a `bool` via `quickcheck::Gen` — short alias used in the cluster
/// helpers' 50/50 curated-slug-vs-`Other` branches.
// referenced by helpers; lint trips on partial-feature builds
pub
/// `String::arbitrary(g)` shorthand used by the helpers.
pub