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

pub enum SyntaxError {
Show 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.

ExpectedPath(String)

Error when a path is expected.

BlockName(String)

Error if a block name is not a simple identifier.

LiteralNewline(String)

Error when a newline is enccountered in a raw literal.

PartialPosition(String)

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

SubExprNotOpen(String)

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

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.

PathDelimiterNotAllowed(String)

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

ElseNotAllowed(String)

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

UnexpectedPathExplicitThis(String)

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

UnexpectedPathParent(String)

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

UnexpectedPathLocal(String)

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

UnexpectedPathDelimiter(String)

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

UnexpectedPathParentWithLocal(String)

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

UnexpectedPathParentWithExplicit(String)

Error attempting to mix parent scope references and explicit this.

ExpectedPathDelimiter(String)

Error when a path delimiter is expected.

OpenSubExpression(String)

Error when a sub-expression was not terminated.

TagNameMismatch(String)

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

BlockNotOpen(String)

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

SubExpressionNotTerminated(String)

Error when a sub-expression is not terminated.

LinkNotTerminated(String)

Erro when a link is not terminated.

RawBlockOpenNotTerminated(String)

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

RawBlockNotTerminated(String)

Error when a raw block is not terminated.

RawCommentNotTerminated(String)

Error when a raw comment is not terminated.

RawStatementNotTerminated(String)

Error when a raw statement is not terminated.

CommentNotTerminated(String)

Error when a comment is not terminated.

BlockTargetSubExpr(String)

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

EmptyPath(String)

Error when an empty path is encountered.

ComponentType(String)

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

MixedPartialConditional(String)

Error attempting to combine partials with conditionals.

TokenError(StringString)

Invalid token error (internal error).

TokenCallTarget(String)

Invalid token error (internal error).

TokenJsonLiteral(String)

Invalid token error (internal error).

TokenParameter(String)

Invalid token error (internal error).

TokenHashKeyValue(String)

Invalid token error (internal error).

TokenRawLiteral(String)

Invalid token error (internal error).

TokenDoubleQuoteLiteral(String)

Invalid token error (internal error).

TokenSingleQuoteLiteral(String)

Invalid token error (internal error).

TokenArrayLiteral(String)

Invalid token error (internal error).

Invalid token error (internal error).

TokenParameterPath(String)

Invalid token error (internal error).

TokenEndRawBlock(String)

Invalid token error (internal error).

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.