Enum twig::error::TemplateError [] [src]

pub enum TemplateError {
    UnexpectedEndOfTemplate,
    ExpectedTokenTypeButReceived((TokenValue, Received)),
    UnexpectedTokenValue(TokenValue),
    ExpectedOtherTokenValue((TokenValue, TokenValue)),
    ExpectedArrayElement,
    ArrayValueMustBeFollowedByComma,
    ArrayNotClosed,
    ExpectedHashElement,
    HashValueMustBeFollowedByComma,
    InvalidHashKey {
        unexpected: TokenValue,
    },
    HashKeyMustBeFollowedByColon,
    HashNotClosed,
    ExpectedNameOrNumber,
    ListOfArgumentsMustBeginWithParenthesis,
    ArgumentsMustBeSeparatedByComma,
    ListOfArgumentsMustCloseWithParenthesis,
    Unclosed(String),
    UnclosedComment,
    UnclosedBlock(String),
    Unexpected(String),
    UnexpectedCharacter(String),
    ParenthesisNotClosed,
    MustStartWithTagName,
    DefaultValueForArgumentMustBeConstant,
    ParameterNameMustBeAString {
        given: String,
    },
    TemplateNotFound(String),
    CustomError(Box<ExtensionError>),
}

Variants

UnexpectedEndOfTemplate
ExpectedTokenTypeButReceived
UnexpectedTokenValue
ExpectedOtherTokenValue
ExpectedArrayElement
ArrayValueMustBeFollowedByComma
ArrayNotClosed
ExpectedHashElement
HashValueMustBeFollowedByComma
InvalidHashKey

Fields

unexpected
HashKeyMustBeFollowedByColon
HashNotClosed
ExpectedNameOrNumber
ListOfArgumentsMustBeginWithParenthesis
ArgumentsMustBeSeparatedByComma
ListOfArgumentsMustCloseWithParenthesis
Unclosed
UnclosedComment
UnclosedBlock
Unexpected
UnexpectedCharacter
ParenthesisNotClosed
MustStartWithTagName
DefaultValueForArgumentMustBeConstant
ParameterNameMustBeAString

Fields

given
TemplateNotFound
CustomError

Methods

impl TemplateError

fn at(self, line: usize) -> At<TemplateError>

Trait Implementations

impl Display for TemplateError

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

Derived Implementations

impl Debug for TemplateError

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for TemplateError

fn clone(&self) -> TemplateError

fn clone_from(&mut self, source: &Self)