pub enum RenderError {
UnclosedBinding {
expr: String,
context: String,
},
UnclosedUnescapedBinding {
expr: String,
context: String,
},
EmptyBinding {
context: String,
},
MissingState {
binding: String,
context: String,
},
UnclosedDirective {
tag: String,
context: String,
},
MissingValueAttribute {
tag: String,
context: String,
},
InvalidRepeatExpression {
expr: String,
context: String,
},
NotAnArray {
binding: String,
context: String,
},
JsonParse {
message: String,
},
DuplicateTemplate {
element: String,
paths: Vec<String>,
},
TemplateReadError {
path: String,
message: String,
},
}Expand description
An error encountered while rendering a FAST HTML template.
Variants§
UnclosedBinding
{{expr with no closing }}.
UnclosedUnescapedBinding
{{{expr with no closing }}}.
EmptyBinding
{{}} — the expression between {{ and }} is empty.
MissingState
{{key}} — key is not present in the provided state.
UnclosedDirective
A directive (<f-when> / <f-repeat>) has no matching closing tag.
MissingValueAttribute
A directive is missing a valid value="{{…}}" attribute.
InvalidRepeatExpression
<f-repeat value="{{expr}}"> — expression is not in item in list format.
NotAnArray
<f-repeat> binding resolves to a value that is not a JSON array.
JsonParse
The state string passed to render_template is not valid JSON.
DuplicateTemplate
Two or more template files resolve to the same element name.
TemplateReadError
A template file could not be read from the filesystem.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RenderError
impl RefUnwindSafe for RenderError
impl Send for RenderError
impl Sync for RenderError
impl Unpin for RenderError
impl UnsafeUnpin for RenderError
impl UnwindSafe for RenderError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more