Skip to main content

ExplanationIssue

Enum ExplanationIssue 

Source
pub enum ExplanationIssue {
    UniversalUnanswered {
        question: UniversalQuestion,
    },
    UniversalAnsweredTwice {
        question: UniversalQuestion,
    },
    DeclaredUnanswered {
        question: &'static str,
        slot: u16,
    },
    DeclaredAnsweredTwice {
        question: &'static str,
        slot: u16,
    },
    QuestionOutsideRoster {
        question: &'static str,
    },
    SeatBoundExceeded {
        bound: u64,
        observed: u64,
    },
    OutputsBesideTheProof {
        expected: u16,
        observed: u16,
        diverges: u16,
    },
}
Expand description

One way a set of answers fails to cover the questions a kind owes.

No row is payload-free: an issue names the question it is about, because a bare row makes the reader guess which seat to repair.

Variants§

§

UniversalUnanswered

A universal question has no answer.

Fields

§question: UniversalQuestion

The unanswered question.

§

UniversalAnsweredTwice

A universal question was answered more than once.

Fields

§question: UniversalQuestion

The doubled question.

§

DeclaredUnanswered

A question the kind declared has no answer.

Fields

§question: &'static str

The question’s declared name.

§slot: u16

Its position in the kind’s roster.

§

DeclaredAnsweredTwice

A question the kind declared was answered more than once.

Fields

§question: &'static str

The question’s declared name.

§slot: u16

Its position in the kind’s roster.

§

QuestionOutsideRoster

An answer names a question its own roster does not carry.

Fields

§question: &'static str

The question’s declared name.

§

SeatBoundExceeded

More seats were offered than a declared bound admits.

Fields

§bound: u64

The declared bound.

§observed: u64

The observed count.

§

OutputsBesideTheProof

The output answer does not restate the proof’s own rendered roster.

The lawful rows are derivable from the closure a view is completed over, so the pass rebuilds them and compares whole — a missing seat, an extra row, a reordered roster, and a digest that is not the proof’s all land here rather than riding a coverage-complete view.

Fields

§expected: u16

Rows the proof’s rendered roster carries.

§observed: u16

Rows the supplied answer carried.

§diverges: u16

The first roster position where the supplied answer stops restating the proof — the shorter roster’s own end where one merely ran out.

Implementations§

Source§

impl ExplanationIssue

Source

pub fn canonical_bytes(&self) -> Vec<u8>

This issue’s canonical bytes on their own, for the related identity a diagnostic derives over it.

Source

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

Appends this issue’s canonical bytes: the row’s position in the declared roster, then the typed material that row carries, framed.

Two rows carrying one question encode differently, because the row’s position rides ahead of the material.

Source§

impl ExplanationIssue

Source

pub const fn slot(&self) -> u8

This row’s position in the declared roster, written ahead of the issue’s own material.

Source

pub const fn observed(&self) -> Observed

How what this issue observed differs from the contract that was expected.

Trait Implementations§

Source§

impl Clone for ExplanationIssue

Source§

fn clone(&self) -> ExplanationIssue

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 ExplanationIssue

Source§

impl Debug for ExplanationIssue

Source§

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

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

impl Display for ExplanationIssue

Source§

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

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

impl Eq for ExplanationIssue

Source§

impl Hash for ExplanationIssue

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 ExplanationIssue

Source§

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

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> 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 = !

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.