#[non_exhaustive]pub enum Error {
Message(String),
Utf8(Utf8Error),
Io(Error),
Eval(Error),
Parse(Error),
}
Expand description
The error type used by this crate.
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)
Represents a generic error message.
Utf8(Utf8Error)
Represents an error that resulted from invalid UTF8 input.
Io(Error)
Represents generic IO errors.
Eval(Error)
Represents errors during expression evaluation.
Parse(Error)
Represents errors while parsing HCL.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Error for Error
impl Error for Error
Source§fn custom<T: Display>(msg: T) -> Self
fn custom<T: Display>(msg: T) -> Self
Raised when there is general error when deserializing a type. Read more
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize
receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize
receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Raised when deserializing a sequence or map and the input data contains
too many or too few elements. Read more
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize
enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize
struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Raised when a
Deserialize
struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Raised when a
Deserialize
struct type received more than one of the
same field.Source§impl IntoDeserializer<'_, Error> for BlockLabel
impl IntoDeserializer<'_, Error> for BlockLabel
Source§type Deserializer = BlockLabel
type Deserializer = BlockLabel
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Body
impl IntoDeserializer<'_, Error> for Body
Source§type Deserializer = NewtypeStructDeserializer<Vec<Structure>>
type Deserializer = NewtypeStructDeserializer<Vec<Structure>>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Expression
impl IntoDeserializer<'_, Error> for Expression
Source§type Deserializer = Expression
type Deserializer = Expression
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for HeredocStripMode
impl IntoDeserializer<'_, Error> for HeredocStripMode
Source§type Deserializer = StrDeserializer<'static, Error>
type Deserializer = StrDeserializer<'static, Error>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Identifier
impl IntoDeserializer<'_, Error> for Identifier
Source§type Deserializer = StringDeserializer<Error>
type Deserializer = StringDeserializer<Error>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for ObjectKey
impl IntoDeserializer<'_, Error> for ObjectKey
Source§type Deserializer = ObjectKey
type Deserializer = ObjectKey
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Operation
impl IntoDeserializer<'_, Error> for Operation
Source§type Deserializer = Operation
type Deserializer = Operation
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Structure
impl IntoDeserializer<'_, Error> for Structure
Source§type Deserializer = Structure
type Deserializer = Structure
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for TemplateExpr
impl IntoDeserializer<'_, Error> for TemplateExpr
Source§type Deserializer = TemplateExpr
type Deserializer = TemplateExpr
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for TraversalOperator
impl IntoDeserializer<'_, Error> for TraversalOperator
Source§type Deserializer = TraversalOperator
type Deserializer = TraversalOperator
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Value
impl IntoDeserializer<'_, Error> for Value
Source§type Deserializer = ValueDeserializer
type Deserializer = ValueDeserializer
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl IntoDeserializer<'_, Error> for Variable
impl IntoDeserializer<'_, Error> for Variable
Source§type Deserializer = StringDeserializer<Error>
type Deserializer = StringDeserializer<Error>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for Attribute
impl<'de> IntoDeserializer<'de, Error> for Attribute
Source§type Deserializer = MapAccessDeserializer<AttributeAccess>
type Deserializer = MapAccessDeserializer<AttributeAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for BinaryOp
impl<'de> IntoDeserializer<'de, Error> for BinaryOp
Source§type Deserializer = MapAccessDeserializer<BinaryOpAccess>
type Deserializer = MapAccessDeserializer<BinaryOpAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for Block
impl<'de> IntoDeserializer<'de, Error> for Block
Source§type Deserializer = MapAccessDeserializer<BlockAccess>
type Deserializer = MapAccessDeserializer<BlockAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for Conditional
impl<'de> IntoDeserializer<'de, Error> for Conditional
Source§type Deserializer = MapAccessDeserializer<ConditionalAccess>
type Deserializer = MapAccessDeserializer<ConditionalAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for ForExpr
impl<'de> IntoDeserializer<'de, Error> for ForExpr
Source§type Deserializer = MapAccessDeserializer<ForExprAccess>
type Deserializer = MapAccessDeserializer<ForExprAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for FuncCall
impl<'de> IntoDeserializer<'de, Error> for FuncCall
Source§type Deserializer = MapAccessDeserializer<FuncCallAccess>
type Deserializer = MapAccessDeserializer<FuncCallAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for FuncName
impl<'de> IntoDeserializer<'de, Error> for FuncName
Source§type Deserializer = MapAccessDeserializer<FuncNameAccess>
type Deserializer = MapAccessDeserializer<FuncNameAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for Heredoc
impl<'de> IntoDeserializer<'de, Error> for Heredoc
Source§type Deserializer = MapAccessDeserializer<HeredocAccess>
type Deserializer = MapAccessDeserializer<HeredocAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for Traversal
impl<'de> IntoDeserializer<'de, Error> for Traversal
Source§type Deserializer = MapAccessDeserializer<TraversalAccess>
type Deserializer = MapAccessDeserializer<TraversalAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Source§impl<'de> IntoDeserializer<'de, Error> for UnaryOp
impl<'de> IntoDeserializer<'de, Error> for UnaryOp
Source§type Deserializer = MapAccessDeserializer<UnaryOpAccess>
type Deserializer = MapAccessDeserializer<UnaryOpAccess>
The type of the deserializer being converted into.
Source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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