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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! THE STREAM DESCRIPTOR's vocabulary, and the newtypes that make a foreign `mediaframe` word
//! declarable.
//!
//! # The posture, and it is [`mediatime`](super::mediatime)'s exactly
//!
//! The vocabulary crate stays STANDALONE and untouched; what happens here is that this crate grows
//! a feature-gated module giving its words FACES. Nothing is added to `mediaframe`, nothing is
//! re-implemented from it, and the semantics it rules — the lowercase canon, the FFmpeg n9.0 roster,
//! the open escape — are inherited rather than re-decided. Each citizen is a NEWTYPE over the
//! foreign value, which is the only shape the orphan rule leaves: a face is this crate's trait on
//! this crate's type, and `impl Display for mediaframe::VideoCodec` is not a row anyone but
//! `mediaframe` can write.
//!
//! The names are BARE — [`VideoCodec`], [`AudioCodec`], [`SubtitleCodec`], each spelled as its
//! upstream is — on [`Timebase`](super::mediatime::Timebase)'s precedent rather than
//! [`MediaTimestamp`](super::mediatime::MediaTimestamp)'s. The qualifier that house wears is owed
//! only where a RESIDENT word is at stake, and no resident word is near a codec: this crate spells
//! `CursorCodec` for a page token's encode/decode, which is the other sense of the word and is a
//! trait rather than a wire type, so it collides on neither namespace.
//!
//! # The gate
//!
//! The whole house rides `feature = "mediaframe"`, the door named for the DEPENDENCY it admits —
//! and the FAMILIES beneath it are modules rather than words of their own, which is the
//! *按依赖分门* reading the manifest row states. Every face beneath carries its own cross-gate on
//! top — `async-graphql` for the wire, `sqlx` for the comparisons, `mongo` for the document form —
//! so a build takes the vocabulary without the faces it has no backend for.
//!
//! Unlike `mediatime`'s word this one does NOT imply `derive`, and the manifest row says why: no
//! filter in this house is declared, so there is no proc-macro beneath the word to be missing.
//!
//! # FIRST WAVE: [`codec`] lands, and the language family is REFUSED BY NAME
//!
//! Two families had record-station pull. One of them is here.
//!
//! [`codec`] is the track tables' codec seats — three roster enums with an open `Other` escape,
//! which is the exact shape [`primitives::lang`](super::lang)'s three subtags already have a
//! citizenship pattern for, and it is that pattern this house takes.
//!
//! **`mediaframe::lang::Language` is NOT admitted, and the reason is that this crate already has
//! the citizen it would be.** That family's `Language` is a validated BCP 47 tag — a language
//! subtag plus an optional script and an optional region, with variants and extensions validated
//! and then DISCARDED. [`LanguageId`](super::lang::LanguageId) is the same invariant answered
//! wider: the same three subtags, plus the lossless tail the other drops, folded through two
//! vendored registries at the door so an mkv's `ger`, an mp4's `deu` and a forty-year-old muxer's
//! `iw` become `de`, `de` and `he`. Admitting the foreign type beside it would publish three
//! things this house is built to refuse:
//!
//! - **A SECOND BCP 47 citizen under a name the resident already registers.** `Language` is a
//! GraphQL scalar [`primitives::lang`](super::lang) publishes today, and GraphQL keeps ONE FLAT
//! NAMESPACE — so two `Language` types in one schema are a name async-graphql resolves in
//! silence. That is the exact hazard [`mediatime`](super::mediatime)'s name walk exists to avoid,
//! met here with no rename available: renaming the newcomer would leave two scalars asking one
//! question, which is the collision solved by spelling rather than by design.
//! - **A LOSSY citizen beside a lossless one.** The variants the foreign type discards are exactly
//! the tail [`LanguageId`](super::lang::LanguageId) keeps.
//! - **A SECOND FOLD for one question.** The law that family is built on is ONE fold per question,
//! applied at the DOOR — which is what lets a stored column and a query operand meet without
//! either knowing the other's spelling. A citizen validating through `icu_locale_core` while the
//! resident folds through the registries would make `ger` two different values depending on which
//! door a caller happened to use, and no amount of care downstream can put that back together.
//!
//! What the refusal COSTS is a caller holding a `mediaframe::Language` and wanting the resident
//! column, and the honest seat for that is a CONVERSION rather than a citizenship — which is the
//! posture `mediaframe`'s own module note already takes for the engine crates upstream of it,
//! *boundary-convert in*. It is not built here: it is a cross-family row over a landed house, and
//! it reverses the premise this wave was dispatched under, so it is RECORDED for a ruling rather
//! than taken. Until then the conversion is one public line at a call site —
//! `LanguageId::new(&tag.to_bcp47())` — which is what makes the absence a deferral rather than a
//! wall.
//!
//! # The storage road: TEXT, and the census is what picked it
//!
//! Every citizen here stores as its CANONICAL SLUG in one text column, and the alternative — a
//! numeric discriminant — is not available rather than merely worse. The vocabulary is OPEN: the
//! `Other` arm holds a codec FFmpeg named after this table was generated, and a discriminant has no
//! number to give it. Storing text is therefore the only road that is TOTAL over the value space,
//! and it is the one the upstream is already built for — the whole space is lowercase-canonical, so
//! text equality IS value equality.
//!
//! That is the same road [`primitives::lang`](super::lang)'s subtags take and for the same
//! sentence, and it is the road `SoundEventCode`'s numeric one deliberately does not: a code from a
//! CLOSED published ontology has a number that means something, and a codec name has none.
pub use ;