#[non_exhaustive]pub enum InputValidationError {
EmptyTree,
IncompatibleVersion {
tree_version: IrVersion,
engine_version: IrVersion,
},
InvalidChildReference {
parent: NodeId,
child: NodeId,
node_count: u32,
},
MultipleParents {
child: NodeId,
parent_a: NodeId,
parent_b: NodeId,
},
SelfReference {
node: NodeId,
},
OrphanNode {
node: NodeId,
},
ResourceLimitExceeded {
limit_name: &'static str,
current: u64,
max: u64,
node_path: Vec<NodeId>,
},
InvalidPageTemplate {
detail: String,
},
UnsupportedFeature {
node_id: NodeId,
feature_name: String,
detail: String,
},
}Expand description
Errors produced when validating a StyledTree.
Each variant includes machine-readable context sufficient for the consumer to identify and fix the problem without guesswork.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyTree
The tree contains no nodes.
IncompatibleVersion
The tree’s IR version is incompatible with this engine build.
InvalidChildReference
A node’s children list references a NodeId that does not exist.
MultipleParents
A node appears in the children list of more than one parent, violating the tree (single-parent) invariant.
SelfReference
A node lists itself as its own child.
OrphanNode
A non-root node is not reachable from the root via any children chain.
ResourceLimitExceeded
A resource limit defined in ResourceLimits
has been exceeded.
Fields
InvalidPageTemplate
The page template configuration is invalid (e.g., margins exceed page dimensions, negative margin values).
UnsupportedFeature
A feature is present in the IR but is not supported by this engine version. This is a hard error — unsupported features never produce silent fallbacks.
Trait Implementations§
Source§impl Debug for InputValidationError
impl Debug for InputValidationError
Source§impl Display for InputValidationError
impl Display for InputValidationError
Source§impl Error for InputValidationError
impl Error for InputValidationError
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()