Enum tera::ErrorKind

source ·
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

Fields

§tpl: String

Name of the template with the loop

§inheritance_chain: Vec<String>

All the parents templates we found so far

A loop was found while looking up the inheritance chain

§

MissingParent

Fields

§current: String

The template we are currently looking at

§parent: String

The missing template

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

Fields

§context: String

The context that indicates where the error occurs in the rendering process

UTF-8 conversion error

This should not occur unless invalid UTF8 chars are rendered

Trait Implementations§

source§

impl Debug for ErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V