pub struct Attribute {
pub key: Identifier,
pub expr: Expression,
}Expand description
Represents an HCL attribute which consists of an attribute key and a value expression.
In HCL syntax this is represented as:
key = valueUse Attribute::new to construct an Attribute from a value that is convertible to this
crate’s Expression type.
Fields§
§key: IdentifierThe HCL attribute’s key.
expr: ExpressionThe value expression of the HCL attribute.
Implementations§
Source§impl Attribute
impl Attribute
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Attribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Attribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Attribute
Source§impl Evaluate for Attribute
impl Evaluate for Attribute
Source§impl Format for Attribute
impl Format for Attribute
Source§fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<(), Error>where
W: Write,
fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<(), Error>where
W: Write,
Formats a HCL structure using a formatter and writes the result to the provided writer. Read more
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,
) -> <Attribute as IntoDeserializer<'de, Error>>::Deserializer
fn into_deserializer( self, ) -> <Attribute as IntoDeserializer<'de, Error>>::Deserializer
Convert this value into a deserializer.
Source§impl Serialize for Attribute
impl Serialize for Attribute
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.