pub enum ErrorKind {
Show 14 variants
Msg(String),
CircularExtend {
tpl: String,
inheritance_chain: Vec<String>,
},
MissingParent {
current: String,
parent: String,
},
TemplateNotFound(String),
FilterNotFound(String),
TestNotFound(String),
InvalidMacroDefinition(String),
FunctionNotFound(String),
Json(Error),
CallFunction(String),
CallFilter(String),
CallTest(String),
Io(ErrorKind),
Utf8Conversion {
context: String,
},
// some variants omitted
}
Expand description
The kind of an error (non-exhaustive)
Variants§
Msg(String)
Generic error
CircularExtend
A loop was found while looking up the inheritance chain
Fields
MissingParent
A template is extending a template that wasn’t found in the Tera instance
TemplateNotFound(String)
A template was missing (more generic version of MissingParent)
FilterNotFound(String)
A filter wasn’t found
TestNotFound(String)
A test wasn’t found
InvalidMacroDefinition(String)
A macro was defined in the middle of a template
FunctionNotFound(String)
A function wasn’t found
Json(Error)
An error happened while serializing JSON
CallFunction(String)
An error occured while executing a function.
CallFilter(String)
An error occured while executing a filter.
CallTest(String)
An error occured while executing a test.
Io(ErrorKind)
An IO error occured
Utf8Conversion
UTF-8 conversion error
This should not occur unless invalid UTF8 chars are rendered
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more