Skip to main content

DepList

Enum DepList 

Source
pub enum DepList {
    Prod,
    Dev,
}
Expand description

Closed-set typed enum for the two dep-list author-surface axes every top-level crate::Caixa carries — the runtime-closure :deps slot (Prod) and the dev-only-closure :deps-dev slot (Dev). Every substrate consumer that dispatches on “which of the two dep-lists” (the feira add mutation head, the future per-cluster dev-closure- audit overlay the M4 CR materializer resolves per-CR, the future caixa app graph per-list dep summary, every future Caixa::push_dep / Caixa::deps_by_list typed-method dispatch a caller reaches for) reads through this enum rather than through a bare &'static str — the closed-set is expressed at the type layer, so a future third dep-list axis (a :deps-build build-only closure once the substrate grows cross-artifact heterogeneous dep-graphs, per CAIXA-SDLC §I) is one variant plus one arm per method and the compiler enforces exhaustiveness on every consumer’s match arms.

The wire byte-string Self::as_str returns is the same author- surface tag the sibling crate::render::DEP_AUTHOR_KEY_DEPS / crate::render::DEP_AUTHOR_KEY_DEPS_DEV constants carry — the DepError::DuplicateNome / DepError::DepIsSelf list: &'static str payload family the substrate already emits routes through the same source of truth (an author reading a DepError::DuplicateNome refusal can grep their caixa.lisp for the offending :deps / :deps-dev block in one edit whether the diagnostic came from a Caixa::validate_deps walk or a Caixa::push_dep mutation).

Same “closed-set typed-enum discriminator with canonical projections per axis” discipline the sibling closed-set typed enums on the caixa typed surface carry (crate::aplicacao::PlacementStrategy cc8f749, crate::aplicacao::RateLimitUnit 6bce03d, crate::supervisor::RestartStrategy, crate::supervisor::RestartPolicy, crate::upgrade::UpgradeInstruction, crate::CaixaKind) — extended onto the outer-Caixa two-list dep-graph axis, the substrate’s last unlifted closed-set-shaped &'static str-carrying axis on the top-level manifest surface.

Variants§

§

Prod

Runtime-closure :deps axis — the load-bearing dep-list the lacre closure resolves at every build. Wire-format crate::render::DEP_AUTHOR_KEY_DEPS.

§

Dev

Dev-only-closure :deps-dev axis — Cargo’s [dev-dependencies] table’s dev-time-only visibility contract per CAIXA-SDLC §I. Wire-format crate::render::DEP_AUTHOR_KEY_DEPS_DEV.

Implementations§

Source§

impl DepList

Source

pub const fn is_prod(&self) -> bool

Source

pub const fn is_dev(&self) -> bool

Source§

impl DepList

Source

pub const ALL: &'static [Self]

Exhaustive iteration surface for every consumer that reads the full closed-set (the future M4 admission webhook’s per-list summary rejection body, any future round-trip pin harness). A future variant addition extends this slice as a single edit and every consumer picks up the new entry by construction — the compiler-checked exhaustiveness on the sibling method match arms is the build-time guarantee that no arm forgets to grow.

Source

pub const fn as_str(self) -> &'static str

Canonical author-surface tag every substrate consumer that names the offending dep-list in a diagnostic reaches for — crate::render::DEP_AUTHOR_KEY_DEPS for Self::Prod and crate::render::DEP_AUTHOR_KEY_DEPS_DEV for Self::Dev, the same &'static str payload the sibling DepError::DuplicateNome and DepError::DepIsSelf variants already carry. Routing every dep-list diagnostic through the closed-set enum’s as_str closes the last &'static str-shape literal-carry axis on the two-list dep-graph surface — a future kebab-case rebrand (":deps"":packages") or a wire-format promotion (a distinct diagnostic form for the Dev arm) reaches every consumer through one edit on the canonical constant, not a coordinated rewrite across the substrate’s dep-graph consumers.

Source

pub fn from_wire(s: &str) -> Option<Self>

Substrate-canonical reverse projection on the two-list dep-graph axis — parses the author-surface wire tag back to the typed variant, or None when s is outside the closed-set arm-string set Self::as_str emits. Dispatches on the same lifted crate::render::DEP_AUTHOR_KEY_DEPS / crate::render::DEP_AUTHOR_KEY_DEPS_DEV constants the Self::as_str emitter walks, so the parse and emit halves of the round-trip migrate through one caixa-core edit on any future list-axis addition.

Prior to this lift the substrate carried only the forward Self → &str projection on the two-list dep-graph axis (the Self::as_str emitter, the std::fmt::Display impl routed through it, the two DepError::DuplicateNome / DepError::DepIsSelf variants that carry the wire tag verbatim as a &'static str list: field). Every future consumer that wanted to promote the wire tag back to the typed enum (a future feira dep --list <deps|deps-dev> CLI arg-parse that binds the wire form into the typed enum before dispatching to crate::Caixa::deps_of / crate::Caixa::push_dep, the M4 mesh.pleme.io/v1alpha1/Caixa CR materializer’s admission-time wire re-parse of the per-list diagnostic body, a future DepError widening that promotes the two list: &'static str fields to a typed list: DepList carry so downstream consumers dispatch on the enum rather than string-comparing the wire scalar) would have had to re-inline a two-arm match s { ":deps" => …, ":deps-dev" => …, _ => … } cascade that expressed no compile-time link back to the typed DepList enum. A future variant addition (a :build-dep or :test-dep third list once the substrate grows Cargo-style split-graphs, a :tool-dep for build-time-only tooling per the peer Cargo [build-dependencies] / [target.<cfg>.dev-dependencies] future admission surface) would silently split the wire byte-string the emitter walks from the parser’s arm-set — the round-trip would carry the new list through the forward projection but land on the fallback silently at every non-updated reverse parser, far from the arm-addition commit that caused the drift. Lifting the resolver to a typed method on the substrate primitive closes the drift footgun by construction: the parser’s accept-set is the same set the Self::as_str emitter walks (routed through the same lifted crate::render::DEP_AUTHOR_KEY_DEPS / crate::render::DEP_AUTHOR_KEY_DEPS_DEV consts), so both halves of the round-trip migrate through one caixa-core edit on any future list-axis addition.

Same closed-set-reverse-projection discipline the sibling crate::CaixaKind::from_wire (2aa6d23) / crate::supervisor::RestartStrategy::from_wire (4eec29c) / crate::supervisor::RestartPolicy::from_wire (dd32ccf) / crate::aplicacao::PlacementStrategy::from_wire (18c7342) / crate::aplicacao::RateLimitUnit::from_suffix typed enums carry on the peer wire-side str → Self axes — extended onto the two-list dep-graph closed-set axis, the sixth substrate-side closed-set typed enum on the caixa surface to converge on the two-way str ↔ Self round-trip. Method-named from_wire (not from_str) to match the peer shapes verbatim and side-step the derived std::str::FromStr impls the sibling gen_platform::FromStrKind-carrying axes install on their kebab-case dispatcher-catalog identity. Returns Option<Self> (rather than Result<Self, _>) to match the peer shapes: the caller picks the diagnostic form appropriate for its use site — a future feira dep --list … arg-parse that surfaces unknown list: <arg> at the CLI builds one on top by iterating Self::ALL, while the future M4 admission-webhook’s rejection path folds None onto its per-CR structured refusal body.

Trait Implementations§

Source§

impl Clone for DepList

Source§

fn clone(&self) -> DepList

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DepList

Source§

impl Debug for DepList

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DepList

Route std::fmt::Display through DepList::as_str, so every consumer that formats the axis as user-facing text (a future feira app graph per-list summary, a future M4 admission-webhook rejection body naming the offending list, this crate’s own DepError #[error(...)] templates when they widen to carry a typed DepList) lands on the same author-surface tag the crate::render::DEP_AUTHOR_KEY_DEPS / crate::render::DEP_AUTHOR_KEY_DEPS_DEV constants carry. Same as-str-through-Display convergence discipline the sibling crate::aplicacao::PlacementStrategy, crate::aplicacao::RateLimitUnit, crate::supervisor::RestartStrategy, crate::supervisor::RestartPolicy, and crate::CaixaKind closed-set typed enums carry.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DepList

Source§

impl Hash for DepList

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DepList

Source§

fn eq(&self, other: &DepList) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DepList

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.