pub struct Module { /* private fields */ }Expand description
A Terraform file: its preamble (comment lines), then top-level blocks, each with the comment above it.
Implementations§
Source§impl Module
impl Module
Sourcepub fn new(preamble: impl Into<String>) -> Module
pub fn new(preamble: impl Into<String>) -> Module
A module starting with preamble, written as it is (comment lines, each ending with a
newline).
Sourcepub fn commented(&mut self, comment: &str, block: Block)
pub fn commented(&mut self, comment: &str, block: Block)
Adds a top-level block with a comment above it (each line of comment becomes a # line).
Sourcepub fn blocks(&mut self, blocks: impl IntoIterator<Item = Block>)
pub fn blocks(&mut self, blocks: impl IntoIterator<Item = Block>)
Adds blocks.
Trait Implementations§
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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