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
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more