pub struct ServicoCountMismatch {
pub nome: String,
pub count: usize,
}Expand description
Typed :servicos-count-mismatch view: the canonical surface every
per-Servico caixa-<target> renderer raises when it’s handed a
Caixa whose :servicos list doesn’t carry exactly one entry —
the V0 contract every Servico-kind caixa satisfies (caixa-helm’s
render_chart_for_servico, caixa-flux’s programs_yaml_entry, the
future per-Servico OCI/wasm packager). Carries the offending caixa’s
:nome alongside the actual count, so the diagnostic reads caixa "<nome>": :servicos must declare exactly one entry for V0 (got <count>) — naming which caixa.lisp needs author attention, not
just the count the renderer rejected.
Lifted from two identical-shape per-renderer arms in
caixa-helm and caixa-flux
(Error::UnsupportedServicoCount(usize)). The prior arms each
carried only the actual count, leaving the user to grep for which
caixa.lisp triggered the mismatch — exactly the “feira verb whose
error path doesn’t name the offending caixa” punch-list item the
compounding-mandate protocol calls out. Same trajectory as
KindMismatch (which lifted the prior NotAServico(CaixaKind) /
NotAnAplicacao(CaixaKind) per-renderer arms into a typed view
naming the offending caixa).
Renderers wrap this view in their own thiserror Error enum
via #[from]; the ? operator at every count-checking call site
turns the require_single_servico result into the renderer’s
local error type with no manual conversion. Peer to require_kind
on the V0 Servico-shape gate axis (the kind gate refuses the wrong
:kind; this gate refuses the wrong :servicos count) — every
per-Servico renderer chains both at its entry point.
Fields§
§nome: StringThe offending caixa’s :nome — names which caixa.lisp the
renderer was handed, so the diagnostic doesn’t require the
user to grep for it.
count: usizeThe :servicos list length the offending caixa actually carries.
The expected count is fixed at 1 by the V0 contract — every
:kind Servico caixa declares exactly one ComputeUnit YAML
pointer, matching the one Helm chart / one programs.yaml entry
each renderer emits.
Trait Implementations§
Source§impl Clone for ServicoCountMismatch
impl Clone for ServicoCountMismatch
Source§fn clone(&self) -> ServicoCountMismatch
fn clone(&self) -> ServicoCountMismatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServicoCountMismatch
impl Debug for ServicoCountMismatch
Source§impl Display for ServicoCountMismatch
impl Display for ServicoCountMismatch
impl Eq for ServicoCountMismatch
Source§impl Error for ServicoCountMismatch
impl Error for ServicoCountMismatch
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ServicoCountMismatch
impl PartialEq for ServicoCountMismatch
impl StructuralPartialEq for ServicoCountMismatch
Auto Trait Implementations§
impl Freeze for ServicoCountMismatch
impl RefUnwindSafe for ServicoCountMismatch
impl Send for ServicoCountMismatch
impl Sync for ServicoCountMismatch
impl Unpin for ServicoCountMismatch
impl UnsafeUnpin for ServicoCountMismatch
impl UnwindSafe for ServicoCountMismatch
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.