Skip to main content

RootBinding

Struct RootBinding 

Source
pub struct RootBinding {
    pub roots_enumerated: usize,
    pub sites: [(EffectRootKind, usize); 8],
    pub effects: usize,
}
Expand description

What a walk over the effect roots actually examined.

CLAUDE.md: a green gate that binds to nothing is vacuous, not a pass. A proof over “every effect” is only as good as the roots it reached and the bundles it found there, and neither number is visible from the proof’s own output. This is that ledger, filled in by for_each_effect_root on every call.

Fields§

§roots_enumerated: usize

How many of EffectRootKind::COUNT roots the walk enumerated. Always COUNT for a walk that ran — a smaller number means a root stopped being enumerated, which the walk itself asserts against.

§sites: [(EffectRootKind, usize); 8]

Per-root: how many bundles the campaign actually has there. A zero is not a failure — a campaign with no traps has no traps[].payload — but it is the reason a proof over that root binds to nothing, and it is reported rather than left for a reader to infer.

§effects: usize

Total top-level effects across every root.

Implementations§

Source§

impl RootBinding

Source

pub fn unbound_roots(&self) -> Vec<EffectRootKind>

The roots this campaign has no bundles at — where any proof over the effect surface is necessarily unbound.

Source

pub fn to_json(&self) -> Value

The ledger as a JSON object, for <out>/validation/effect-roots.json.

Self::summary renders the same numbers for a human reading stderr, and stderr is where they stayed: a build’s stated binding was a string nothing downstream could read, so a gate that wants to assert “this campaign’s effect walk bound to something” had to scrape prose or go without. Every other proof in this compiler already publishes its binding as a validation/*.json ledger; this is the one that did not, and spec-0039 criterion 6 needs it machine-readable — “printed somewhere” is explicitly not enough.

unbound_roots is listed rather than left to be derived: a zero at a root is not a failure (a campaign with no traps has no trap payloads), but it is the reason any proof over that root binds to nothing, and the point of a ledger is that a reader does not have to infer it.

Source

pub fn summary(&self) -> String

A one-line, deterministic rendering for a report or a --json field.

Trait Implementations§

Source§

impl Clone for RootBinding

Source§

fn clone(&self) -> RootBinding

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 Debug for RootBinding

Source§

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

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

impl Eq for RootBinding

Source§

impl PartialEq for RootBinding

Source§

fn eq(&self, other: &RootBinding) -> 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 RootBinding

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<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.