pub struct Expansion<K: Kind> { /* private fields */ }Expand description
Everything one request produced, bound under one identity, with tokens reachable from here and from nowhere else.
One cannot be held without a plan, a closure proved over that plan, and an explanation answered over the two, all having been produced and having agreed.
Expansion::plan and Expansion::closure are the same values the deliveries are read from, so what it says it did and what it did cannot drift.
Implementations§
Source§impl<K: Kind> Expansion<K>
impl<K: Kind> Expansion<K>
Sourcepub fn bound(
plan: Plan<K>,
closure: Closure<K::Role>,
explanation: View<K>,
) -> Result<Self, BindError>
pub fn bound( plan: Plan<K>, closure: Closure<K::Role>, explanation: View<K>, ) -> Result<Self, BindError>
Bind one expansion: the plan, the closure proved against it, and the explanation answered over the two.
The road every kind’s request terminates at. A caller that walked the steps arrives with three unforgeable values and leaves with the one account emission is reachable from; a caller that skipped a step has nothing to hand in.
§Construction
The identity is derived at Role::ClosedExpansion, anchored on the CLOSURE — an expansion exists only where a closure does — over a content transcript of exactly two members: the plan’s identity, then the explanation’s.
Nothing else enters, and each absence is the no-double-entry law. The deliveries are inside the anchor, because a closure’s identity commits to their digests; the kind and the account are inside member one, because a plan’s identity commits to its intent. A second spelling of either here would write one fact twice and let the two spellings drift.
§Errors
Returns BindError naming the pair that disagreed and both of its identities.
Nothing is elected out of any pair: an expansion naming one plan while carrying another’s proof, or another’s explanation, would answer every question correctly about the wrong expansion.
Sourcepub const fn identity(&self) -> ClosedExpansionId
pub const fn identity(&self) -> ClosedExpansionId
This expansion’s own identity: the name of the whole account.
Sourcepub const fn provenance(&self) -> &Provenance
pub const fn provenance(&self) -> &Provenance
The record of how that identity was derived.
Sourcepub const fn plan(&self) -> &Plan<K>
pub const fn plan(&self) -> &Plan<K>
The complete plan: account, context, content, membership, watch set, trace, trail, and nonclaims.
Sourcepub const fn closure(&self) -> &Closure<K::Role>
pub const fn closure(&self) -> &Closure<K::Role>
The proof that what was rendered is what was planned.
Sourcepub const fn explain(&self) -> &View<K>
pub const fn explain(&self) -> &View<K>
Every question this kind owes, answered over that plan and that proof.
Sourcepub const fn emission(&self) -> &PartitionedEmission
pub const fn emission(&self) -> &PartitionedEmission
The deliveries this expansion carries, split by destination.
The closure’s own proved value, borrowed rather than copied: this expansion keeps no second emission, so what is delivered is what was proved and there is no pair of values to drift apart.
Sourcepub const fn emit(&self) -> &PartitionCargo
pub const fn emit(&self) -> &PartitionCargo
What the declaration site expands into — the only tokens the consumer’s normal build compiles.
Sourcepub const fn test_carrier(&self) -> &PartitionCargo
pub const fn test_carrier(&self) -> &PartitionCargo
The deferred cargo the consumer’s test target invokes.
Sourcepub const fn bench_carrier(&self) -> &PartitionCargo
pub const fn bench_carrier(&self) -> &PartitionCargo
The deferred cargo the consumer’s bench target invokes.
Sourcepub fn published(&self) -> impl Iterator<Item = &RenderedUnit<K::Role>>
pub fn published(&self) -> impl Iterator<Item = &RenderedUnit<K::Role>>
Every unit this expansion publishes as a standalone artifact, in seat order, each carrying the address its own planned output names.
Read off the proved rendering rather than copied into a record beside it: a published artifact IS its rendered unit at an address, and a second value restating that unit’s tree, digest, and seat would be a second answer to one question.
Trait Implementations§
Source§impl<K: Kind> Emittable for Expansion<K>
impl<K: Kind> Emittable for Expansion<K>
Source§fn cargos(&self) -> impl Iterator<Item = &PartitionCargo>
fn cargos(&self) -> impl Iterator<Item = &PartitionCargo>
One cargo: an expansion carries exactly one declaration-site delivery, the one its own closure proved.