Expand description
Variants
Attribute(Attribute)
Represents an HCL attribute.
Block(Block)
Represents an HCL block.
Implementations
sourceimpl Structure
impl Structure
sourcepub fn is_attribute(&self) -> bool
pub fn is_attribute(&self) -> bool
Returns true
if the structure represents an Attribute
.
sourcepub fn as_attribute(&self) -> Option<&Attribute>
pub fn as_attribute(&self) -> Option<&Attribute>
If the Structure
is an Attribute, returns a reference to the Attribute
. Returns None
otherwise.
sourcepub fn as_attribute_mut(&mut self) -> Option<&mut Attribute>
pub fn as_attribute_mut(&mut self) -> Option<&mut Attribute>
If the Structure
is an Attribute, returns a mutable reference to the Attribute
. Returns
None otherwise.
sourcepub fn as_block(&self) -> Option<&Block>
pub fn as_block(&self) -> Option<&Block>
If the Structure
is a Block, returns a reference to the Block
. Returns None otherwise.
sourcepub fn as_block_mut(&mut self) -> Option<&mut Block>
pub fn as_block_mut(&mut self) -> Option<&mut Block>
If the Structure
is a Block, returns a mutable reference to the Block
. Returns None
otherwise.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Structure
impl<'de> Deserialize<'de> for Structure
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<'de> IntoDeserializer<'de, Error> for Structure
impl<'de> IntoDeserializer<'de, Error> for Structure
type Deserializer = StructureDeserializer
type Deserializer = StructureDeserializer
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.
impl StructuralPartialEq for Structure
Auto Trait Implementations
impl RefUnwindSafe for Structure
impl Send for Structure
impl Sync for Structure
impl Unpin for Structure
impl UnwindSafe for Structure
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