#[non_exhaustive]
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 (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
Fields
msg: String
The error message.
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
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl Error for Error
impl Error for Error
sourcefn 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
sourcefn 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 moresourcefn 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 moresourcefn 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
sourcefn 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. Read moresourcefn 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. Read moresourcefn 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. Read moresourcefn 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. Read moresourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for BinaryOperator
impl<'de> IntoDeserializer<'de, Error> for BinaryOperator
type Deserializer = StrDeserializer<'static, Error>
type Deserializer = StrDeserializer<'static, Error>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for Identifier
impl<'de> IntoDeserializer<'de, Error> for Identifier
type Deserializer = NewtypeStructDeserializer<String, Error>
type Deserializer = NewtypeStructDeserializer<String, Error>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for RawExpression
impl<'de> IntoDeserializer<'de, Error> for RawExpression
type Deserializer = NewtypeStructDeserializer<String, Error>
type Deserializer = NewtypeStructDeserializer<String, Error>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for UnaryOperator
impl<'de> IntoDeserializer<'de, Error> for UnaryOperator
type Deserializer = StrDeserializer<'static, Error>
type Deserializer = StrDeserializer<'static, Error>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
sourceimpl<'de> IntoDeserializer<'de, Error> for Variable
impl<'de> IntoDeserializer<'de, Error> for Variable
type Deserializer = NewtypeStructDeserializer<String, Error>
type Deserializer = NewtypeStructDeserializer<String, Error>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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