Enum bracket::error::syntax::SyntaxError[][src]

pub enum SyntaxError {
Show 42 variants ExpectedIdentifier(String), ExpectedPath(String), BlockName(String), LiteralNewline(String), PartialPosition(String), SubExprNotOpen(String), SubExprTargetNotAllowed(String), PathDelimiterNotAllowed(String), ElseNotAllowed(String), UnexpectedPathExplicitThis(String), UnexpectedPathParent(String), UnexpectedPathLocal(String), UnexpectedPathDelimiter(String), UnexpectedPathParentWithLocal(String), UnexpectedPathParentWithExplicit(String), ExpectedPathDelimiter(String), OpenSubExpression(String), TagNameMismatch(String), BlockNotOpen(String), SubExpressionNotTerminated(String), LinkNotTerminated(String), RawBlockOpenNotTerminated(String), RawBlockNotTerminated(String), RawCommentNotTerminated(String), RawStatementNotTerminated(String), CommentNotTerminated(String), BlockTargetSubExpr(String), EmptyPath(String), ComponentType(String), MixedPartialConditional(String), TokenError(StringString), TokenCallTarget(String), TokenJsonLiteral(String), TokenParameter(String), TokenHashKeyValue(String), TokenRawLiteral(String), TokenDoubleQuoteLiteral(String), TokenSingleQuoteLiteral(String), TokenArrayLiteral(String), TokenLink(String), TokenParameterPath(String), TokenEndRawBlock(String),
}
Expand description

Errors generated when compiling a template.

Variants

ExpectedIdentifier(String)

Error when an identifier is expected.

Tuple Fields of ExpectedIdentifier

0: String
ExpectedPath(String)

Error when a path is expected.

Tuple Fields of ExpectedPath

0: String
BlockName(String)

Error if a block name is not a simple identifier.

Tuple Fields of BlockName

0: String
LiteralNewline(String)

Error when a newline is enccountered in a raw literal.

Tuple Fields of LiteralNewline

0: String
PartialPosition(String)

Error when the partial operator is not the first token in a call statement.

Tuple Fields of PartialPosition

0: String
SubExprNotOpen(String)

Error when a sub-expression is closed by no sub-expression is open.

Tuple Fields of SubExprNotOpen

0: String
SubExprTargetNotAllowed(String)

Error when a sub-expression attempts to use a sub-expression for it’s target.

Currently sub-expressions for the target are only supported when evaluating partials.

Tuple Fields of SubExprTargetNotAllowed

0: String
PathDelimiterNotAllowed(String)

Error when a path delimiter is encountered in an invalid position.

Tuple Fields of PathDelimiterNotAllowed

0: String
ElseNotAllowed(String)

Error when the else keyword is encountered in an invalid position.

Tuple Fields of ElseNotAllowed

0: String
UnexpectedPathExplicitThis(String)

Error when the this keywords is not at the start of a path.

Tuple Fields of UnexpectedPathExplicitThis

0: String
UnexpectedPathParent(String)

Error when a parent path reference (../) is not at the start of a path.

Tuple Fields of UnexpectedPathParent

0: String
UnexpectedPathLocal(String)

Error when a local identifier is not at the start of a path.

Tuple Fields of UnexpectedPathLocal

0: String
UnexpectedPathDelimiter(String)

Error when an identifier is expected but a path delimiter was encountered.

Tuple Fields of UnexpectedPathDelimiter

0: String
UnexpectedPathParentWithLocal(String)

Error when parent scope references and local identifiers are combined illegally.

Tuple Fields of UnexpectedPathParentWithLocal

0: String
UnexpectedPathParentWithExplicit(String)

Error attempting to mix parent scope references and explicit this.

Tuple Fields of UnexpectedPathParentWithExplicit

0: String
ExpectedPathDelimiter(String)

Error when a path delimiter is expected.

Tuple Fields of ExpectedPathDelimiter

0: String
OpenSubExpression(String)

Error when a sub-expression was not terminated.

Tuple Fields of OpenSubExpression

0: String
TagNameMismatch(String)

Error when a closing tag name does not match the opening name.

Tuple Fields of TagNameMismatch

0: String
BlockNotOpen(String)

Error when an end tag is encountered but no block is open.

Tuple Fields of BlockNotOpen

0: String
SubExpressionNotTerminated(String)

Error when a sub-expression is not terminated.

Tuple Fields of SubExpressionNotTerminated

0: String
LinkNotTerminated(String)

Erro when a link is not terminated.

Tuple Fields of LinkNotTerminated

0: String
RawBlockOpenNotTerminated(String)

Error when the opening tag for a raw block is not terminated.

Tuple Fields of RawBlockOpenNotTerminated

0: String
RawBlockNotTerminated(String)

Error when a raw block is not terminated.

Tuple Fields of RawBlockNotTerminated

0: String
RawCommentNotTerminated(String)

Error when a raw comment is not terminated.

Tuple Fields of RawCommentNotTerminated

0: String
RawStatementNotTerminated(String)

Error when a raw statement is not terminated.

Tuple Fields of RawStatementNotTerminated

0: String
CommentNotTerminated(String)

Error when a comment is not terminated.

Tuple Fields of CommentNotTerminated

0: String
BlockTargetSubExpr(String)

Error attempting to use a sub-expression outside of a partial target context.

Tuple Fields of BlockTargetSubExpr

0: String
EmptyPath(String)

Error when an empty path is encountered.

Tuple Fields of EmptyPath

0: String
ComponentType(String)

Error if we could not identify the type of a path component (internal error).

Tuple Fields of ComponentType

0: String
MixedPartialConditional(String)

Error attempting to combine partials with conditionals.

Tuple Fields of MixedPartialConditional

0: String
TokenError(StringString)

Invalid token error (internal error).

Tuple Fields of TokenError

0: String1: String
TokenCallTarget(String)

Invalid token error (internal error).

Tuple Fields of TokenCallTarget

0: String
TokenJsonLiteral(String)

Invalid token error (internal error).

Tuple Fields of TokenJsonLiteral

0: String
TokenParameter(String)

Invalid token error (internal error).

Tuple Fields of TokenParameter

0: String
TokenHashKeyValue(String)

Invalid token error (internal error).

Tuple Fields of TokenHashKeyValue

0: String
TokenRawLiteral(String)

Invalid token error (internal error).

Tuple Fields of TokenRawLiteral

0: String
TokenDoubleQuoteLiteral(String)

Invalid token error (internal error).

Tuple Fields of TokenDoubleQuoteLiteral

0: String
TokenSingleQuoteLiteral(String)

Invalid token error (internal error).

Tuple Fields of TokenSingleQuoteLiteral

0: String
TokenArrayLiteral(String)

Invalid token error (internal error).

Tuple Fields of TokenArrayLiteral

0: String

Invalid token error (internal error).

Tuple Fields of TokenLink

0: String
TokenParameterPath(String)

Invalid token error (internal error).

Tuple Fields of TokenParameterPath

0: String
TokenEndRawBlock(String)

Invalid token error (internal error).

Tuple Fields of TokenEndRawBlock

0: String

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.