Enum hcl::Expression
source · [−]#[non_exhaustive]
pub enum Expression {
Null,
Bool(bool),
Number(Number),
String(String),
Array(Vec<Expression>),
Object(Object<ObjectKey, Expression>),
Raw(RawExpression),
}
Expand description
A type representing the expression sub-language is used within attribute definitions to specify values.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Null
Represents a null value.
Bool(bool)
Represents a boolean.
Number(Number)
Represents a number, either integer or float.
String(String)
Represents a string.
Array(Vec<Expression>)
Represents array.
Object(Object<ObjectKey, Expression>)
Represents an object.
Raw(RawExpression)
Represents a raw HCL expression. This includes any expression kind that does match any of
the enum variants above. See RawExpression
for more details.
Trait Implementations
sourceimpl Clone for Expression
impl Clone for Expression
sourcefn clone(&self) -> Expression
fn clone(&self) -> Expression
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 Debug for Expression
impl Debug for Expression
sourceimpl<'de> Deserialize<'de> for Expression
impl<'de> Deserialize<'de> for Expression
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<&'_ str> for Expression
impl From<&'_ str> for Expression
sourceimpl<'a, T: Clone + Into<Expression>> From<&'a [T]> for Expression
impl<'a, T: Clone + Into<Expression>> From<&'a [T]> for Expression
sourceimpl From<()> for Expression
impl From<()> for Expression
sourceimpl<'a> From<Cow<'a, str>> for Expression
impl<'a> From<Cow<'a, str>> for Expression
sourceimpl From<Expression> for Value
impl From<Expression> for Value
sourcefn from(expr: Expression) -> Self
fn from(expr: Expression) -> Self
Converts to this type from the input type.
sourceimpl From<IndexMap<ObjectKey, Expression, RandomState>> for Expression
impl From<IndexMap<ObjectKey, Expression, RandomState>> for Expression
sourcefn from(f: Object<ObjectKey, Expression>) -> Self
fn from(f: Object<ObjectKey, Expression>) -> Self
Converts to this type from the input type.
sourceimpl From<RawExpression> for Expression
impl From<RawExpression> for Expression
sourcefn from(raw: RawExpression) -> Self
fn from(raw: RawExpression) -> Self
Converts to this type from the input type.
sourceimpl From<String> for Expression
impl From<String> for Expression
sourceimpl From<Value> for Expression
impl From<Value> for Expression
sourceimpl<T: Into<Expression>> From<Vec<T, Global>> for Expression
impl<T: Into<Expression>> From<Vec<T, Global>> for Expression
sourceimpl From<bool> for Expression
impl From<bool> for Expression
sourceimpl From<f32> for Expression
impl From<f32> for Expression
sourceimpl From<f64> for Expression
impl From<f64> for Expression
sourceimpl From<i16> for Expression
impl From<i16> for Expression
sourceimpl From<i32> for Expression
impl From<i32> for Expression
sourceimpl From<i64> for Expression
impl From<i64> for Expression
sourceimpl From<i8> for Expression
impl From<i8> for Expression
sourceimpl From<isize> for Expression
impl From<isize> for Expression
sourceimpl From<u16> for Expression
impl From<u16> for Expression
sourceimpl From<u32> for Expression
impl From<u32> for Expression
sourceimpl From<u64> for Expression
impl From<u64> for Expression
sourceimpl From<u8> for Expression
impl From<u8> for Expression
sourceimpl From<usize> for Expression
impl From<usize> for Expression
sourceimpl<K: Into<ObjectKey>, V: Into<Expression>> FromIterator<(K, V)> for Expression
impl<K: Into<ObjectKey>, V: Into<Expression>> FromIterator<(K, V)> for Expression
sourceimpl<T: Into<Expression>> FromIterator<T> for Expression
impl<T: Into<Expression>> FromIterator<T> for Expression
sourcefn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl<'de> IntoDeserializer<'de, Error> for Expression
impl<'de> IntoDeserializer<'de, Error> for Expression
type Deserializer = ExpressionDeserializer
type Deserializer = ExpressionDeserializer
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 PartialEq<Expression> for Expression
impl PartialEq<Expression> for Expression
sourcefn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Expression) -> bool
fn ne(&self, other: &Expression) -> bool
This method tests for !=
.
sourceimpl Serialize for Expression
impl Serialize for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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