pub enum Error {
    Message {
        msg: String,
        location: Option<Location>,
    },
    Eof,
    Utf8(Utf8Error),
    Io(Error),
    InvalidEscape(char),
    InvalidUnicodeCodePoint(String),
    InvalidIdentifier(String),
    Eval(Error),
}Expand description
The error type used by this crate.
Variants§
Message
Fields
Represents a generic error message with optional location.
Eof
Represents the error emitted when the Deserializer hits an unexpected end of input.
Utf8(Utf8Error)
Represents an error that resulted from invalid UTF8 input.
Io(Error)
Represents generic IO errors.
InvalidEscape(char)
Represents errors due to invalid escape characters that may occur when unescaping user-provided strings.
InvalidUnicodeCodePoint(String)
Represents errors due to invalid unicode code points that may occur when unescaping user-provided strings.
InvalidIdentifier(String)
Represents errors that resulted from identifiers that are not valid in HCL.
Eval(Error)
Represents errors during expression evaluation.
Implementations§
Trait Implementations§
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 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)>
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<'de> IntoDeserializer<'de, Error> for Attribute
 
impl<'de> IntoDeserializer<'de, Error> for Attribute
§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
§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
§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 BlockLabel
 
impl<'de> IntoDeserializer<'de, Error> for BlockLabel
§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<'de> IntoDeserializer<'de, Error> for Body
 
impl<'de> IntoDeserializer<'de, Error> for Body
§type Deserializer = NewtypeStructDeserializer<Vec<Structure, Global>, Error>
 
type Deserializer = NewtypeStructDeserializer<Vec<Structure, Global>, 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 Conditional
 
impl<'de> IntoDeserializer<'de, Error> for Conditional
§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 Expression
 
impl<'de> IntoDeserializer<'de, Error> for Expression
§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<'de> IntoDeserializer<'de, Error> for ForExpr
 
impl<'de> IntoDeserializer<'de, Error> for ForExpr
§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
§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 Heredoc
 
impl<'de> IntoDeserializer<'de, Error> for Heredoc
§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 HeredocStripMode
 
impl<'de> IntoDeserializer<'de, Error> for HeredocStripMode
§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<'de> IntoDeserializer<'de, Error> for Identifier
 
impl<'de> IntoDeserializer<'de, Error> for Identifier
§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 ObjectKey
 
impl<'de> IntoDeserializer<'de, Error> for ObjectKey
§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<'de> IntoDeserializer<'de, Error> for Operation
 
impl<'de> IntoDeserializer<'de, Error> for Operation
§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<'de> IntoDeserializer<'de, Error> for RawExpression
 
impl<'de> IntoDeserializer<'de, Error> for RawExpression
§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 Structure
 
impl<'de> IntoDeserializer<'de, Error> for Structure
§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<'de> IntoDeserializer<'de, Error> for TemplateExpr
 
impl<'de> IntoDeserializer<'de, Error> for TemplateExpr
§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<'de> IntoDeserializer<'de, Error> for Traversal
 
impl<'de> IntoDeserializer<'de, Error> for Traversal
§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 TraversalOperator
 
impl<'de> IntoDeserializer<'de, Error> for TraversalOperator
§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<'de> IntoDeserializer<'de, Error> for UnaryOp
 
impl<'de> IntoDeserializer<'de, Error> for UnaryOp
§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.
source§impl<'de> IntoDeserializer<'de, Error> for Value
 
impl<'de> IntoDeserializer<'de, Error> for Value
§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<'de> IntoDeserializer<'de, Error> for Variable
 
impl<'de> IntoDeserializer<'de, Error> for Variable
§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.