pub fn machine<T: serde::Serialize>(&self, output: &T) -> Result<()> {
        if !self.is_machine() {
            return Ok(());
        }
        match self.format {
            Some(Format::Json) => {
                serde_json::to_writer(self.inner(), output)?;
            }
            _ => return Err(anyhow!("Unknown format")),
        }
        Ok(())
    }
/// Writes machine consumable output to standard output.
///
/// This is a no-op if `is_machine` returns false.
Writes machine consumable output to standard output.
This is a no-op if `is_machine` returns false.
Writes machine consumable output to standard output . This is a no - op if ` is_machine ` returns false .
pub fn machine<T: serde::Serialize>(&self, output: &T) -> Result<()> {
        if !self.is_machine() {
            return Ok(());
        }
        match self.format {
            Some(Format::Json) => {
                serde_json::to_writer(self.inner(), output)?;
            }
            _ => return Err(anyhow!("Unknown format")),
        }
        Ok(())
    }
pub fn machine < T : serde :: Serialize > ( & self , output : & T ) -> Result < ( ) > { if ! self . is_machine ( ) { return Ok ( ( ) ) ; } match self . format { Some ( Format :: Json ) => { serde_json :: to_writer ( self . inner ( ) , output ) ? ; } _ => return Err ( anyhow ! ( " " ) ) , } Ok ( ( ) ) }
Writes machine consumable output to standard output.
Writes machine consumable output to standard output .
&self
output
&T
&self
output
&T