Enum ErrorKind
#[non_exhaustive]
pub enum ErrorKind
All the kind of errors Tera can produce. Non-exhaustive so we can add more if needed without a breaking change.
Variants
-
Msg(String) Generic error
-
SyntaxError(Box<ReportError>) Both lexer and parser errors. Will point to the source file
-
RenderingError(Box<ReportError>) An error that happens while rendering a template. Will point to the source file
-
CircularExtend { tpl: String, inheritance_chain: Vec<String> } A loop was found while looking up the inheritance chain
-
CircularInclude { tpl: String, include_chain: Vec<String> } A loop was found while following
{% include %}calls between templates-
MissingParent { current: String, parent: String } A template is extending a template that wasn't found in the Tera instance
-
TemplateNotFound(String) A template was missing
-
ComponentNotFound(String) A component was missing Only raised if you're trying to render a specific component
-
InvalidArgument { expected_type: String, actual_type: String } A filter/test main value was not the expected type
-
MissingArgument { arg_name: String } A function/test/filter was expecting an argument but it wasn't found
-
OutOfRangeArgument { value: String, target_type: String } A numeric argument had the right type but did not fit in the target type
-
Io(ErrorKind) An IO error occurred
-
Utf8Conversion UTF-8 conversion error when converting output to UTF-8
This should not occur unless invalid UTF8 chars are rendered
Trait Implementations
impl Clone for ErrorKind
fn clone(&self) -> ErrorKind
impl Debug for ErrorKind
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for ErrorKind
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for ErrorKind
impl PartialEq for ErrorKind
fn eq(&self, other: &ErrorKind) -> bool
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
impl<T> Any for ErrorKind
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ErrorKind
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ErrorKind
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for ErrorKind
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for ErrorKind
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for ErrorKind
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for ErrorKind
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for ErrorKind
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for ErrorKind
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for ErrorKind
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>