Skip to main content

UniversalAnswer

Enum UniversalAnswer 

Source
pub enum UniversalAnswer {
    Kind {
        name: &'static str,
    },
    Owner {
        owner: OwnerFact,
    },
    CausingDeclarations {
        commitment: Identity<CapturedDeclaration>,
        dependencies: Bounded<Identity<CapturedDeclaration>, DEPENDENCY_LIMIT>,
    },
    Profile {
        profile: Profile,
    },
    OutputAndDigest {
        outputs: Bounded<AnsweredOutput, MEMBERSHIP_LIMIT>,
    },
    Assumptions {
        assumptions: Bounded<OwnerFact, ASSUMPTION_LIMIT>,
    },
    Invalidators {
        triggers: InvalidationSet,
    },
    RelatedDispositions {
        related: Bounded<RelatedDisposition, RELATED_KIND_LIMIT>,
    },
    Repairs {
        repairs: Bounded<Repair, REPAIR_LIMIT>,
    },
}
Expand description

One typed answer to a universal question.

Every arm carries the exact values that answer its row — identities, typed rosters, typed dispositions — and never a sentence standing in for a fact.

Variants§

§

Kind

The kind this output is.

Fields

§name: &'static str

The kind’s declared name.

§

Owner

The owner fact that required it.

Fields

§owner: OwnerFact

The requiring fact.

§

CausingDeclarations

The declarations it was derived from.

Fields

§commitment: Identity<CapturedDeclaration>

The content commitment the request walked in with.

§dependencies: Bounded<Identity<CapturedDeclaration>, DEPENDENCY_LIMIT>

The captures that content declares it stands on.

§

Profile

The profile it was decided under.

Fields

§profile: Profile

The profile, at the version it was decided at.

§

OutputAndDigest

Every member it is, and the digest proved over each one’s rendered bytes.

The complete set in roster order, never a chosen row: a kind’s roster may fill several seats, and an answer naming one of them would be coverage-complete syntax over a flattened denominator — the second output’s identity and digest simply absent from a view that claims the whole expansion. Each row is two values because they come from two places: the member is what the plan declared, and the digest is what the closure proved.

Fields

§outputs: Bounded<AnsweredOutput, MEMBERSHIP_LIMIT>

One row per rendered seat, in roster order; never empty in a lawful expansion, because a rendering is structurally non-empty — and completion refuses a set that does not restate the proof’s own roster, so a shortened or reordered answer cannot ride a coverage-complete view.

§

Assumptions

The owner facts it rests on.

Fields

§assumptions: Bounded<OwnerFact, ASSUMPTION_LIMIT>

The assumed facts.

§

Invalidators

The triggers whose change makes it stale.

Fields

§triggers: InvalidationSet

The watch set.

§

RelatedDispositions

What happened to every kind it is related to.

Fields

§related: Bounded<RelatedDisposition, RELATED_KIND_LIMIT>

The accounted kinds.

§

Repairs

The owner-declared repairs that apply.

Fields

§repairs: Bounded<Repair, REPAIR_LIMIT>

The declared repairs.

Implementations§

Source§

impl UniversalAnswer

Source

pub const fn slot(&self) -> u8

This answer’s position in the declared roster, written ahead of its own material.

Not the question’s position stated twice: the question is what was ASKED and this is which answer SHAPE was given. They agree today because the table above is one-to-one, and a roster that ever admitted two shapes for one question would separate them here rather than deriving one preimage for both. A position is appended and never renumbered.

Trait Implementations§

Source§

impl Answer for UniversalAnswer

Source§

type Question = UniversalQuestion

The roster this answer belongs to.
Source§

fn question(&self) -> UniversalQuestion

The question this answer answers.
Source§

fn encode_into(&self, into: &mut Vec<u8>)

Append this answer’s canonical bytes.
Source§

fn human(&self) -> String

This answer rendered for a person. Read more
Source§

impl Clone for UniversalAnswer

Source§

fn clone(&self) -> UniversalAnswer

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 UniversalAnswer

Source§

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

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

impl Eq for UniversalAnswer

Source§

impl Hash for UniversalAnswer

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 UniversalAnswer

Source§

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

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> 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.