pub enum CaixaDialeto {
Pacote,
Molde,
MoldePosicional,
Desconhecido,
}Expand description
Which (defcaixa …) declaration a source speaks.
The gen_platform::IsVariant derive emits per-arm arm-discriminator
predicates (is_pacote / is_molde / is_molde_posicional /
is_desconhecido) as substrate-side typed dispatches on the closed
four-arm dialect-classification discriminator. Peer of the sibling
closed-set fieldless typed enums’ crate::CaixaKind /
crate::supervisor::RestartStrategy /
crate::supervisor::RestartPolicy /
crate::aplicacao::PlacementStrategy /
crate::aplicacao::RateLimitUnit /
crate::dep::DepList IsVariant derives on the sibling
closed-set typed-enum discriminator axes.
The pre-lift is_molde_family predicate hand-rolled its own
matches!(self, Self::Molde | Self::MoldePosicional) two-arm literal
with no compile-time link back to the closed set — post-lift it routes
through self.is_molde() || self.is_molde_posicional() so a future
arm rename (e.g. Molde → MoldeKW under an M4 vocabulary shift) trips
exhaustively at every derive-generated predicate site rather than
leaving the hand-rolled matches! silently drifting.
Variants§
Pacote
This crate’s crate::Caixa — a tatara-lisp package manifest.
Keyword-argument form headed by :nome.
Molde
pleme-doc-gen’s repo-surface declaration, keyword-argument form
headed by :name (plus :ecosystem / :package).
MoldePosicional
The same declaration as Self::Molde, written with the package name
as a bare positional symbol — (defcaixa todoku-go :kind :Biblioteca :ecosystem :go …). pleme-doc-gen’s parser reads the first token
after the head as the name, so this is one arity of one declaration,
not a third schema.
Desconhecido
A (defcaixa …) form matching neither. Kept as a variant rather than
an error so classify is total and a census can COUNT the residue —
a classifier that threw here would report “0 unknown” by construction.
Implementations§
Source§impl CaixaDialeto
impl CaixaDialeto
Source§impl CaixaDialeto
impl CaixaDialeto
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Exhaustive iteration surface for every consumer that walks the
closed four-arm CaixaDialeto discriminator set — the
feira dialeto
census counter’s per-arm accept-set, a future
feira dialeto --list-dialects CLI listing of the accepted
classifications, a future M4 mesh.pleme.io/v1alpha1/Manifesto
CR materializer’s admission-webhook rejection body naming the
accepted-dialect set, any future census-report shape probe that
sweeps every arm to compute per-arm coverage. A future arm
addition (a fifth dialect the crate::dialeto module doc’s
“third dialect” hazard actualises — the module explicitly frames
its purpose as “what stops a third dialect appearing”, and this
slice is the substrate-side answer: the arm-set is one edit and
every consumer picks up the new entry by construction) extends
this slice as one edit and every downstream consumer picks up
the new entry through the shared iteration; the compiler-checked
exhaustiveness on the sibling method match arms
(Self::palavra_canonica / Self::consumidor /
Self::descricao / std::fmt::Display) is the build-time
guarantee that no arm forgets to grow.
Peer of the sibling closed-set typed enums’
crate::CaixaKind::ALL (6b1f4fb) /
crate::aplicacao::PlacementStrategy::ALL (18c7342) /
crate::aplicacao::RateLimitUnit::ALL (6bce03d) /
crate::dep::DepList::ALL (45ee563) /
crate::supervisor::RestartStrategy::ALL (4eec29c) /
crate::supervisor::RestartPolicy::ALL (dd32ccf)
exhaustive-iteration surfaces — the seventh closed-set typed
enum on the caixa surface to converge onto the same
one-canonical-arm-list-per-enum discipline, and the first
dialect-classification axis (as distinct from an OTP-shape M2
slot or an M3 mesh slot) to reach it. Order matches variant
declaration order verbatim (Pacote → Molde →
MoldePosicional → Desconhecido) so the slice is the
canonical ordering every listing / rendering consumer defers to.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Substrate-canonical PascalCase variant-name byte-string every consumer
that formats the dialect as census-facing text lands on. Returns the
per-arm PascalCase name of the variant ("Pacote" / "Molde" /
"MoldePosicional" / "Desconhecido") — the one canonical
byte-string the paired std::fmt::Display impl routes through so
every downstream consumer (the feira dialeto census counter output
line, a future feira dialeto --list-dialects CLI enumeration, a
future M4 mesh.pleme.io/v1alpha1/Manifesto CR materializer’s
admission-webhook rejection body naming the accepted-dialect set)
reaches for the same substrate primitive rather than the pre-lift
hand-rolled four-arm literal-string match every std::fmt::Display
call previously routed through in place.
Peer of the sibling closed-set typed enums’
crate::CaixaKind::as_str / crate::supervisor::RestartStrategy::as_str
/ crate::supervisor::RestartPolicy::as_str /
crate::aplicacao::PlacementStrategy::as_str /
crate::dep::DepList::as_str projections on the sibling closed-set
typed-enum discriminator axes — the seventh (and last unlifted)
closed-set fieldless typed enum on the caixa surface to converge
onto the same one-canonical-byte-string-per-arm-through-as_str
discipline the six siblings already carry. Unlike crate::CaixaKind
(which carries two axes: as_str returning lowercase Portuguese
diagnostic form vs wire_name returning PascalCase tatara-lisp
author-surface bytes), CaixaDialeto is an internal
classification with no wire surface — the PascalCase variant name
is the census-facing form every consumer reads, so as_str
suffices without a paired wire_name axis.
Sourcepub const fn palavra_canonica(self) -> &'static str
pub const fn palavra_canonica(self) -> &'static str
The keyword an author should write for this dialect, once the
migration named in Self::consumidor completes.
Sourcepub const fn consumidor(self) -> &'static str
pub const fn consumidor(self) -> &'static str
Who reads this dialect.
Sourcepub const fn descricao(self) -> &'static str
pub const fn descricao(self) -> &'static str
A one-line description for a census row or an error message.
Sourcepub const fn is_molde_family(self) -> bool
pub const fn is_molde_family(self) -> bool
True when this arm belongs to the defmolde declaration family —
the two-arity closure of Self::Molde and Self::MoldePosicional
under the shared defmolde head keyword the sibling
Self::palavra_canonica projection already collapses onto
"defmolde" for both arms (and the sibling Self::consumidor
projection collapses onto "pleme-doc-gen" for the same two arms).
False on Self::Pacote (the sibling defcaixa tatara-lisp
package manifest, Self::palavra_canonica → "defcaixa") and
on Self::Desconhecido (the residue that names no known
declaration, Self::palavra_canonica → "?").
The Self::Molde / Self::MoldePosicional split is one
declaration written two ways (Self::MoldePosicional’s
variant-declaration docstring at Self::MoldePosicional frames
it exactly: “the same declaration as Self::Molde, written with
the package name as a bare positional symbol … this is one arity
of one declaration, not a third schema”). Every downstream gate
that keys off “does this dialect belong to the defmolde family”
(as distinct from the four-arm-per-arm census-counter axis the
sibling feira dialeto verb already fans on separately at
caixa-feira/src/cmd/dialeto.rs:110-127) previously hand-rolled
the two-arm collapse inline as matches!(d, CaixaDialeto::Molde | CaixaDialeto::MoldePosicional) — a compile-time-anonymous
two-arm literal set with no link back to the CaixaDialeto
variant declaration nor to the sibling
Self::palavra_canonica / Self::consumidor projections
that already carry the same two-arm collapse under the shared
defmolde / pleme-doc-gen axis. The feira dialeto verb’s
[caixa-feira/src/cmd/dialeto.rs] carried the same
matches! twice — once in the --strict-palavra gate that
refuses a repo-surface declaration still written as
(defcaixa …), once in the wrong-declaration-under-caixa.lisp
gate that refuses a repo-surface declaration under the filename
feira loads as a package manifest — with no compile-time link
between the two hand-rolled arm sets. A future arm addition (the
module doc’s “third dialect” hazard actualises as a fifth arm
CaixaDialeto that belongs to the defmolde declaration
family — a third arity variant, an alias-declaration family
pleme-doc-gen sharpens as its schema evolves) would silently
split the two hand-rolled matches! arm-sets from each other
and from the paired Self::palavra_canonica projection: one
call site picks up the new arm, one does not, and the disagreement
surfaces far from the arm-addition commit as a feira dialeto
consumer reporting a repo-surface declaration under one gate but
not the other. Routing every “belongs to the defmolde family”
predicate through this one substrate primitive closes the axis:
a future arm addition lands one match arm here (a compile-time
exhaustiveness error otherwise), not a coordinated per-matches!
rewrite across every caller.
Peer of the sibling crate::CaixaKind::requires_lib (0421c22)
per-arm-set predicate on the crate::CaixaKind closed-set
discriminator’s “kind requires a lib/ surface” axis — extends
the same “one canonical typed predicate per per-arm-set gate,
one dispatch on the substrate primitive” discipline onto the
CaixaDialeto closed-set discriminator’s “belongs to the
defmolde declaration family” axis. The dialect-classification
axis’s second per-arm-set predicate (first being the implicit
palavra_canonica-through-consumidor-through-descricao arm-set
collapse already carried on the sibling projections) — the first
explicitly-typed per-arm-set predicate on the axis, matching the
discipline the sibling M2 crate::CaixaKind closed-set
discriminator already carries with requires_lib.
Three consumers now route through this one typed dispatch: the
caixa-feira verb’s
--strict-palavra gate (refusing a repo-surface declaration
still written as (defcaixa …)), the same verb’s wrong-
declaration-under-caixa.lisp gate (refusing a repo-surface
declaration under the filename feira loads as a package
manifest), and crate::Caixa::from_lisp’s foreign-dialect
gate (raising [crate::ManifestError::DialetoEstrangeiro] before
the derive’s parse_kwargs_strict walk on any defmolde-family
classification — the pre-lift hand-rolled three-arm
match { Pacote => {}, Desconhecido => {}, foreign => Err(…) }
literal whose foreign => wildcard silently absorbed anything
non-Pacote-non-Desconhecido, now the third external consumer of
the defmolde-family partition).
Trait Implementations§
Source§impl Clone for CaixaDialeto
impl Clone for CaixaDialeto
Source§fn clone(&self) -> CaixaDialeto
fn clone(&self) -> CaixaDialeto
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CaixaDialeto
Source§impl Debug for CaixaDialeto
impl Debug for CaixaDialeto
Source§impl Display for CaixaDialeto
std::fmt::Display routed through CaixaDialeto::as_str, so the
pretty-printed byte-string every consumer that formats the dialect as
user-facing / census text lands on (the feira dialeto per-manifest
--list row, the feira dialeto census summary line’s per-arm
counters, a future M4 admission-webhook’s rejection body naming the
accepted-dialect set) reaches for the same PascalCase per-arm
byte-string the CaixaDialeto::as_str helper returns.
impl Display for CaixaDialeto
std::fmt::Display routed through CaixaDialeto::as_str, so the
pretty-printed byte-string every consumer that formats the dialect as
user-facing / census text lands on (the feira dialeto per-manifest
--list row, the feira dialeto census summary line’s per-arm
counters, a future M4 admission-webhook’s rejection body naming the
accepted-dialect set) reaches for the same PascalCase per-arm
byte-string the CaixaDialeto::as_str helper returns.
Prior to this lift the std::fmt::Display impl hand-rolled its own
four-arm literal-string match — the one hand-rolled per-arm dispatch
on the closed CaixaDialeto discriminator that had NO substrate
primitive accessor to defer to (the sibling CaixaDialeto::palavra_canonica /
CaixaDialeto::consumidor / CaixaDialeto::descricao projections
carry distinct byte-shapes per axis, so none of them could serve as
the Display source). A future variant addition (a fifth dialect the
module doc’s “third dialect” hazard actualises) would land one arm at
the enum and per-arm returns at the paired accessors, but a hand-rolled
std::fmt::Display match would silently drop the new arm to compile-
fail-at-the-match-arm-site rather than through the shared substrate
primitive. Routing std::fmt::Display through CaixaDialeto::as_str
closes the last unlifted per-arm PascalCase-name projection on the
caixa surface — the seventh (and last unlifted) closed-set fieldless
typed enum on the caixa surface to converge onto the same
Display-through-as_str discipline the six siblings
(crate::CaixaKind / crate::supervisor::RestartStrategy /
crate::supervisor::RestartPolicy /
crate::aplicacao::PlacementStrategy / crate::aplicacao::RateLimitUnit
/ crate::dep::DepList) already carry.
impl Eq for CaixaDialeto
Source§impl Hash for CaixaDialeto
impl Hash for CaixaDialeto
Source§impl PartialEq for CaixaDialeto
impl PartialEq for CaixaDialeto
impl StructuralPartialEq for CaixaDialeto
Auto Trait Implementations§
impl Freeze for CaixaDialeto
impl RefUnwindSafe for CaixaDialeto
impl Send for CaixaDialeto
impl Sync for CaixaDialeto
impl Unpin for CaixaDialeto
impl UnsafeUnpin for CaixaDialeto
impl UnwindSafe for CaixaDialeto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.