#[non_exhaustive]pub enum RenderError {
Show 18 variants
MissingValue {
path: String,
part: Option<String>,
},
ExpectedIterable {
path: String,
actual: String,
part: Option<String>,
},
TypeMismatch {
path: String,
expected: &'static str,
actual: &'static str,
part: Option<String>,
},
CurrentItemOutsideLoop,
MetaOutsideLoop {
name: String,
},
CannotConvertToText {
value_type: String,
},
UnknownFilter {
name: String,
part: Option<String>,
},
FilterFailed {
name: String,
message: String,
part: Option<String>,
},
InvalidComparison {
operator: String,
left: String,
right: String,
part: Option<String>,
},
ArithmeticType {
operator: String,
actual: String,
part: Option<String>,
},
DivisionByZero {
operator: String,
part: Option<String>,
},
ArithmeticOverflow {
operator: String,
part: Option<String>,
},
InvalidLiteral {
literal: String,
part: Option<String>,
},
ExpressionNotSupported {
message: String,
part: Option<String>,
},
UnsupportedBlockPlacement {
message: String,
part: Option<String>,
},
TextSpansContainers {
part: String,
paragraph: Vec<usize>,
containers: Vec<Option<usize>>,
},
InvalidPlanTarget {
path: Vec<usize>,
},
InvalidPlan {
message: String,
},
}Expand description
Render error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingValue
Value is missing for a placeholder.
Fields
ExpectedIterable
Expected an iterable value but found something else.
Fields
TypeMismatch
Type mismatch during path resolution.
Fields
CurrentItemOutsideLoop
Current item (.) used outside loop context.
MetaOutsideLoop
Loop metadata used outside loop context.
CannotConvertToText
Cannot convert value to text for insertion.
UnknownFilter
A filter named in the template is not registered.
Fields
FilterFailed
A filter rejected the value it received.
Fields
InvalidComparison
Two values cannot be ordered with the requested operator.
Fields
ArithmeticType
An arithmetic operator received a value that is not a number.
Fields
DivisionByZero
Division or remainder by zero.
Fields
ArithmeticOverflow
Arithmetic produced a value outside the supported number range.
Fields
InvalidLiteral
A number literal in the template is not a valid number.
Fields
ExpressionNotSupported
An expression cannot be used in this position.
Fields
UnsupportedBlockPlacement
Block placement is not supported in DOCX structure.
Fields
TextSpansContainers
A placeholder spans two inline containers.
Fields
InvalidPlanTarget
A resolved edit points outside the region it belongs to.
InvalidPlan
The evaluator produced edits that overlap.
Trait Implementations§
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display 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()