pub struct FmtCommand { /* private fields */ }Expand description
Command for formatting Terraform configuration files.
By default, rewrites files in-place. Use .check() to only verify
formatting without modifying files, or .diff() to display differences.
use terraform_wrapper::{Terraform, TerraformCommand};
use terraform_wrapper::commands::fmt::FmtCommand;
let tf = Terraform::builder().working_dir("/tmp/infra").build()?;
// Check formatting without modifying files
let output = FmtCommand::new().check().execute(&tf).await?;Implementations§
Source§impl FmtCommand
impl FmtCommand
Trait Implementations§
Source§impl Clone for FmtCommand
impl Clone for FmtCommand
Source§fn clone(&self) -> FmtCommand
fn clone(&self) -> FmtCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FmtCommand
impl Debug for FmtCommand
Source§impl Default for FmtCommand
impl Default for FmtCommand
Source§fn default() -> FmtCommand
fn default() -> FmtCommand
Returns the “default value” for a type. Read more
Source§impl TerraformCommand for FmtCommand
impl TerraformCommand for FmtCommand
Auto Trait Implementations§
impl Freeze for FmtCommand
impl RefUnwindSafe for FmtCommand
impl Send for FmtCommand
impl Sync for FmtCommand
impl Unpin for FmtCommand
impl UnsafeUnpin for FmtCommand
impl UnwindSafe for FmtCommand
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