Skip to main content

BindError

Enum BindError 

Source
pub enum BindError {
    ClosureProvedAgainstAnotherPlan {
        planned: PlanId,
        proved: PlanId,
    },
    ExplanationAnsweredOverAnotherPlan {
        planned: PlanId,
        answered: PlanId,
    },
    ExplanationAnsweredOverAnotherClosure {
        proved: ClosureId,
        answered: ClosureId,
    },
}
Expand description

How binding one expansion refuses.

Three values produced separately can disagree about their parentage in exactly three places, and each of the three is a different repair. Every arm names both identities it holds and elects neither.

Variants§

§

ClosureProvedAgainstAnotherPlan

The closure proves a rendering against a plan other than the one handed in beside it.

Fields

§planned: PlanId

The plan handed to the binding.

§proved: PlanId

The plan the closure was actually proved against.

§

ExplanationAnsweredOverAnotherPlan

The explanation was answered over a plan other than the one handed in beside it.

Reachable under one kind, which is why the type parameter cannot catch it: two plans of one kind admit the same questions, so an explanation written over the other one covers its roster exactly.

Fields

§planned: PlanId

The plan handed to the binding.

§answered: PlanId

The plan the explanation was actually answered over.

§

ExplanationAnsweredOverAnotherClosure

The explanation was answered over a proof other than the one handed in beside it.

Reachable on its own, because one plan may be proved by two renderings and an explanation over the other proof states a digest of bytes this expansion never emitted.

Fields

§proved: ClosureId

The proof handed to the binding.

§answered: ClosureId

The proof the explanation was actually answered over.

Implementations§

Source§

impl BindError

Source

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

This disagreement’s complete canonical material: which pair disagreed, then the identity that was BOUND and the identity the value handed in turned out to name, each at full width.

The pair’s position leads, so two pairs holding identities that happened to coincide still derive two related identities. The bound identity rides ahead of the carried one, so a reader of the two knows which is which without the diagnostic saying so twice.

Source§

impl BindError

Source

pub const fn slot(&self) -> u8

This pair’s position in the declared roster, written ahead of the two identities it disagreed over.

Appended and never renumbered: the byte stands inside every related identity derived over a binding refusal.

Trait Implementations§

Source§

impl Clone for BindError

Source§

fn clone(&self) -> BindError

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 BindError

Source§

impl Debug for BindError

Source§

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

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

impl Display for BindError

Source§

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

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

impl Eq for BindError

Source§

impl Error for BindError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl Hash for BindError

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 BindError

Source§

fn eq(&self, other: &BindError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Refused for BindError

Source§

fn observed(&self) -> Observed

Every pair is two identities that had to match and did not.

Source§

fn body(&self) -> LineBody

One disagreement, always.

The binding compares each pair in turn and refuses at the first that disagrees, so there is no body behind the cause and nothing for a line to count.

Source§

fn related(&self) -> Vec<Vec<u8>>

A single cause enumerates nothing: the primary cause is the summary’s own subject, never a member of its related set.

Source§

fn repairs(&self) -> Bounded<Repair, REPAIR_LIMIT>

The one repair, citing this home’s own declared fact.

Unlike a refusal about what a caller declared, the law here is this compiler’s, so the fact is this home’s to cite.

Source§

const PHASE: Phase = Phase::Binding

The step of the road this refusal is raised at.
Source§

const FAMILY: Family = BINDING_FAMILY

The family whose issue space this refusal’s related identities derive in. Read more
Source§

fn class(&self) -> RefusalClass

Which class of refusal the summary line opens with.
Source§

fn first(&self) -> String

How the first established issue reads for a person.
Source§

impl StructuralPartialEq for BindError

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, <T as TryFrom<U>>::Error>

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.