Skip to main content

RenderError

Enum RenderError 

Source
pub enum RenderError {
    NothingRendered,
    SeatUnplanned {
        role: &'static str,
    },
    BytesUnbounded {
        role: &'static str,
        bound: usize,
        observed: usize,
    },
    UnitsUnbounded {
        bound: usize,
        observed: usize,
    },
    TokensUnbounded {
        bound: usize,
        observed: usize,
    },
}
Expand description

How rendering says no.

One refusal, at the first thing that goes wrong: a unit that cannot be materialized is not a unit, and the units after it were never written. Three rows name a declared magnitude and the two counts that passed it; the other two say a rendering and a plan’s seats do not line up at all.

Variants§

§

NothingRendered

The renderer wrote no unit at all.

§

SeatUnplanned

A unit was written under a seat this plan declares no member for.

Refused where it is written rather than where a proof would notice it, because a unit answers to its member’s semantic key and a seat with no member offers none.

Fields

§role: &'static str

The seat’s declared name.

§

BytesUnbounded

One unit’s canonical bytes pass the declared magnitude.

Fields

§role: &'static str

The seat the unit was written under, by its declared name.

§bound: usize

The declared bound.

§observed: usize

The observed count.

§

UnitsUnbounded

The rendering carries more units than the declared magnitude admits.

Fields

§bound: usize

The declared bound.

§observed: usize

The observed count.

§

TokensUnbounded

A generated tree passed the declared per-level magnitude while a unit was being composed.

The one overflow a renderer meets: the composition helpers and the tree assembler are what it builds with, and they are the only roads it takes that bound anything.

Fields

§bound: usize

The declared bound.

§observed: usize

The observed count.

Implementations§

Source§

impl RenderError

Source

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

This refusal’s canonical bytes on their own.

Source

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

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

Exhaustive over the roster on purpose: a row added to RenderError stops compiling HERE until somebody says what of it a preimage commits to.

Source§

impl RenderError

Source

pub const fn slot(&self) -> u8

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

Appended and never renumbered: the byte is part of this refusal’s public canonical encoding.

Trait Implementations§

Source§

impl Clone for RenderError

Source§

fn clone(&self) -> RenderError

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 RenderError

Source§

impl Debug for RenderError

Source§

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

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

impl Display for RenderError

Source§

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

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

impl Eq for RenderError

Source§

impl Error for RenderError

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 From<Overflow> for RenderError

Source§

fn from(overflow: Overflow) -> Self

The refusal a generated tree that outgrew its per-level magnitude makes.

The one overflow a renderer meets, so ? carries a composition helper’s answer straight out of a renderer body.

Source§

impl From<ProjectionError> for RenderError

Source§

fn from(refusal: ProjectionError) -> Self

Converts to this type from the input type.
Source§

impl Hash for RenderError

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 RenderError

Source§

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

Source§

fn body(&self) -> LineBody

Rendering establishes one cause and enumerates nothing.

A unit that cannot be materialized is not a unit, and the units after it were never written, so there is no remainder 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>

This home declares no repair of its own.

Every row above is about the renderer the caller wrote or the plan the caller declared, so the repair is one of those two; a sentence composed here would be this compiler citing a fact nobody declared.

Source§

const PHASE: Phase = Phase::Rendering

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

const FAMILY: Family = RENDERING_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§

fn observed(&self) -> Observed

How what was observed differs from the expected contract, read off that same first issue.
Source§

impl StructuralPartialEq for RenderError

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.