[][src]Enum bracket::error::helper::HelperError

pub enum HelperError {
    Message(String),
    BlockTemplate(String),
    ArityExact(Stringusize),
    ArityRange(Stringusizeusize),
    ArgumentTypeString(Stringusize),
    IterableExpected(Stringusize),
    LookupField(StringString),
    InvalidNumericalOperand(String),
    TypeAssert(StringStringString),
    Syntax(SyntaxError),
    Render(Box<RenderError>),
    Io(IoError),
    Json(Error),
}

Errors generated by helpers.

Variants

Message(String)

Generic error message for helpers.

BlockTemplate(String)

Error when asserting that a helper expects an inner template.

ArityExact(Stringusize)

Error when supplied arguments do not match an exact arity.

ArityRange(Stringusizeusize)

Error when supplied arguments do not match an arity range.

ArgumentTypeString(Stringusize)

Error when a helper expects a string argument.

IterableExpected(Stringusize)

Error when a helper expects an iterable (object or array).

LookupField(StringString)

Error when a field could not be resolved.

InvalidNumericalOperand(String)

Error when the operand to a numerical helper is invalid (not a number).

TypeAssert(StringStringString)

Error when a type assertion fails,

Syntax(SyntaxError)

Proxy for syntax errors that occur via helpers.

For example when dynamically evaluating paths passed to the evaluate() function.

Render(Box<RenderError>)

Proxy for render errors that occur via helpers; for example when rendering inner templates.

Proxy I/O errors.

Json(Error)

Proxy JSON errors.

Implementations

impl HelperError[src]

pub fn new<S: AsRef<str>>(msg: S) -> Self[src]

Create a new helper error with the given message.

Trait Implementations

impl Debug for HelperError[src]

impl Display for HelperError[src]

impl Error for HelperError[src]

impl From<Box<RenderError, Global>> for HelperError[src]

impl From<Error> for HelperError[src]

impl From<Error> for HelperError[src]

impl From<HelperError> for RenderError[src]

impl From<IoError> for HelperError[src]

impl From<SyntaxError> for HelperError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.