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.
BytesUnbounded
One unit’s canonical bytes pass the declared magnitude.
Fields
UnitsUnbounded
The rendering carries more units than the declared magnitude admits.
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.
Implementations§
Source§impl RenderError
impl RenderError
Sourcepub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
This refusal’s canonical bytes on their own.
Sourcepub fn encode_into(&self, into: &mut Vec<u8>)
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.
Trait Implementations§
Source§impl Clone for RenderError
impl Clone for RenderError
Source§fn clone(&self) -> RenderError
fn clone(&self) -> RenderError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RenderError
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
impl Eq for RenderError
Source§impl Error for RenderError
impl Error for RenderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Overflow> for RenderError
impl From<Overflow> for RenderError
Source§impl From<ProjectionError> for RenderError
impl From<ProjectionError> for RenderError
Source§fn from(refusal: ProjectionError) -> Self
fn from(refusal: ProjectionError) -> Self
Source§impl Hash for RenderError
impl Hash for RenderError
Source§impl PartialEq for RenderError
impl PartialEq for RenderError
Source§impl Refused for RenderError
impl Refused for RenderError
Source§fn body(&self) -> LineBody
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.
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>
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.