#[non_exhaustive]pub enum ErrorKind {
Message(String),
UndefinedVar(Identifier),
UndefinedFunc(FuncName),
Unexpected(Value, &'static str),
Index(usize),
UnaryOp(UnaryOperator, Value),
BinaryOp(Value, BinaryOperator, Value),
NoSuchKey(String),
KeyExists(String),
FuncCall(FuncName, String),
}
Expand description
An enum representing all kinds of errors that can happen during the evaluation of HCL expressions and templates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Message(String)
A generic error message.
UndefinedVar(Identifier)
An expression contained an undefined variable.
UndefinedFunc(FuncName)
An expression contained a call to an undefined function.
Unexpected(Value, &'static str)
A different type of value was expected.
Index(usize)
An expression tried to access a non-existing array index.
UnaryOp(UnaryOperator, Value)
An unary operator was applied to a value that does not support it.
BinaryOp(Value, BinaryOperator, Value)
A binary operator was applied to values that do not support it.
NoSuchKey(String)
An expression tried to access an object key which does not exist.
KeyExists(String)
A for
expression attempted to set the same object key twice.
FuncCall(FuncName, String)
A function call in an expression returned an error.
Trait Implementations§
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.