Enum hairy::HairParserError
source · [−]pub enum HairParserError<'a> {
Lexer(HairLexerError),
Parser(&'a str),
Expr(CompileErrorDescription<'a>),
Eval(EvalError<'a>),
Other(&'a str),
}
Expand description
The errors that can occur during Hair template parsing. It can either be a lexer error (so a part of
the input can not be translated to a token), or a parser error (a different token expected).
As Hair templates can contain expressions, these expressions can also trigger errors. These
can either be in the parsing of the expressions, or during optimizing (which causes
EvalErrors). Other errors are reporting using Other
.
Variants
Lexer(HairLexerError)
Parser(&'a str)
Expr(CompileErrorDescription<'a>)
Eval(EvalError<'a>)
Other(&'a str)
Trait Implementations
sourceimpl<'a> Clone for HairParserError<'a>
impl<'a> Clone for HairParserError<'a>
sourcefn clone(&self) -> HairParserError<'a>
fn clone(&self) -> HairParserError<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for HairParserError<'a>
impl<'a> Debug for HairParserError<'a>
sourceimpl<'a> Display for HairParserError<'a>
impl<'a> Display for HairParserError<'a>
sourceimpl<'a> From<EncodingError> for HairParserError<'a>
impl<'a> From<EncodingError> for HairParserError<'a>
sourcefn from(_: EncodingError) -> Self
fn from(_: EncodingError) -> Self
Converts to this type from the input type.
impl<'a> Copy for HairParserError<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for HairParserError<'a>
impl<'a> Send for HairParserError<'a>
impl<'a> Sync for HairParserError<'a>
impl<'a> Unpin for HairParserError<'a>
impl<'a> UnwindSafe for HairParserError<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more