pub enum YamlError {
Show 17 variants
ParseError {
message: String,
context: Option<Box<ErrorContext>>,
},
InvalidRootType {
found: String,
context: Option<Box<ErrorContext>>,
},
NonStringKey {
key_type: String,
path: String,
context: Option<Box<ErrorContext>>,
},
InvalidNumber {
value: String,
context: Option<Box<ErrorContext>>,
},
InvalidExpression {
message: String,
context: Option<Box<ErrorContext>>,
},
InvalidReference {
message: String,
context: Option<Box<ErrorContext>>,
},
NestedObjectInScalar {
path: String,
context: Option<Box<ErrorContext>>,
},
InvalidTensorElement {
path: String,
expected: String,
found: String,
context: Option<Box<ErrorContext>>,
},
ResourceLimitExceeded {
limit_type: String,
limit: usize,
actual: usize,
context: Option<Box<ErrorContext>>,
},
MaxDepthExceeded {
max_depth: usize,
actual_depth: usize,
path: String,
context: Option<Box<ErrorContext>>,
},
DocumentTooLarge {
size: usize,
max_size: usize,
context: Option<Box<ErrorContext>>,
},
ArrayTooLong {
length: usize,
max_length: usize,
path: String,
context: Option<Box<ErrorContext>>,
},
Conversion {
message: String,
context: Option<Box<ErrorContext>>,
},
ForwardReference {
alias: String,
line: usize,
},
CircularReference {
cycle_path: String,
anchors: Vec<String>,
locations: Vec<usize>,
},
InvalidAnchorName {
name: String,
reason: String,
},
AnchorRedefinition {
name: String,
old_line: usize,
new_line: usize,
},
}Expand description
Errors that can occur during YAML to HEDL conversion.
Variants§
ParseError
YAML parsing failed
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
InvalidRootType
Root element must be a mapping/object
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
NonStringKey
Non-string key encountered in mapping
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
InvalidNumber
Invalid number format
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
InvalidExpression
Invalid expression syntax
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
InvalidReference
Invalid reference format
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
NestedObjectInScalar
Nested objects not allowed in scalar context
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
InvalidTensorElement
Invalid tensor element type
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
ResourceLimitExceeded
Resource limit exceeded
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
MaxDepthExceeded
Maximum nesting depth exceeded
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
DocumentTooLarge
Document too large
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
ArrayTooLong
Array too long
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
Conversion
Generic conversion error
Fields
context: Option<Box<ErrorContext>>Source location and code snippet context.
ForwardReference
Forward reference to undefined anchor
Fields
CircularReference
Circular anchor reference detected
Fields
InvalidAnchorName
Invalid anchor name
AnchorRedefinition
Anchor redefinition