pub enum RenderError {
ValueMismatch {
path: String,
reason: String,
},
Unsupported(&'static str),
Canonical(ParseError),
Json(String),
UnexpectedField {
record: String,
field: String,
},
DuplicateFlag {
flag: String,
},
UnionTagMismatch {
tag: String,
reason: String,
},
UnionAmbiguous {
matched: Vec<String>,
},
UnionNoMatch,
}Expand description
Errors produced by the schema/value renderers.
Variants§
ValueMismatch
A crate::schema::SchemaValue did not match the shape required by
the accompanying crate::schema::SchemaType.
Unsupported(&'static str)
A construct is recognised but not supported by the renderer (e.g.,
Future / Stream payloads).
Canonical(ParseError)
A canonical scalar encoder or decoder rejected the input.
Json(String)
A JSON conversion failed (e.g., a number out of range for the target integer width).
UnexpectedField
A record decoder saw a JSON object with a field that is not declared by the schema.
DuplicateFlag
A flags decoder saw the same flag name listed twice.
UnionTagMismatch
A union encoder picked a branch by tag but the branch body did not satisfy the branch’s discriminator rule.
UnionAmbiguous
A union decoder found multiple branches whose discriminator rules match the same incoming value (a structural ambiguity that should have been caught at validation; runtime is a safety net).
UnionNoMatch
A union decoder found no branch whose discriminator rule matches the incoming value.
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 moreSource§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()