fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        fn joiner(endpoints: &[ConnectionEndpoint]) -> String {
            endpoints
                .iter()
                .map(|ce| format!(r#""{}""#, ce))
                .collect::<Vec<_>>()
                .join(",")
        }

        write!(f, "idx:{}", self.node_index)?;
        if let Some(subnet_index) = self.subnet_index {
            write!(f, ",subnet_idx:{}", subnet_index)?;
        }
        write!(f, ",public_api:[{}]", joiner(&self.config.public_api))?;
        write!(f, ",private_api:[{}]", joiner(&self.config.private_api))?;
        write!(
            f,
            ",prometheus_metrics:[{}]",
            joiner(&self.config.prometheus_metrics)
        )?;
        write!(f, r#",p2p_addr:"{}""#, self.config.p2p_addr)?;
        write!(f, r#",xnet_api:[{}]"#, joiner(&self.config.xnet_api))?;

        Ok(())
    }
/// Displays the node in a format that will be accepted by the `--node`
/// flag.
Displays the node in a format that will be accepted by the `--node`
flag.
Displays the node in a format that will be accepted by the ` -- node ` flag .
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        fn joiner(endpoints: &[ConnectionEndpoint]) -> String {
            endpoints
                .iter()
                .map(|ce| format!(r#""{}""#, ce))
                .collect::<Vec<_>>()
                .join(",")
        }
        write!(f, "idx:{}", self.node_index)?;
        if let Some(subnet_index) = self.subnet_index {
            write!(f, ",subnet_idx:{}", subnet_index)?;
        }
        write!(f, ",public_api:[{}]", joiner(&self.config.public_api))?;
        write!(f, ",private_api:[{}]", joiner(&self.config.private_api))?;
        write!(
            f,
            ",prometheus_metrics:[{}]",
            joiner(&self.config.prometheus_metrics)
        )?;
        write!(f, r#",p2p_addr:"{}""#, self.config.p2p_addr)?;
        write!(f, r#",xnet_api:[{}]"#, joiner(&self.config.xnet_api))?;
        Ok(())
    }
fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result { fn joiner ( endpoints : & [ ConnectionEndpoint ] ) -> String { endpoints . iter ( ) . map ( | ce | format ! ( r#""{}""# ce ) ) . collect :: < Vec < _ > > ( ) . join ( " " ) } write ! ( f " " self node_index ) ? ; if let Some ( subnet_index ) = self . subnet_index { write ! ( f " " subnet_index ) ? ; } write ! ( f " " joiner ( self config public_api ) ) ? ; write ! ( f " " joiner ( self config private_api ) ) ? ; write ! ( f " " joiner ( self config prometheus_metrics ) ) ? ; write ! ( f r#",p2p_addr:"{}""# self config p2p_addr ) ? ; write ! ( f r#",xnet_api:[{}]"# joiner ( self config xnet_api ) ) ? ; Ok ( ( ) ) }
Displays the node in a format that will be accepted by the `--node`
flag.
Displays the node in a format that will be accepted by the ` -- node ` flag .
&self
f
&mut std::fmt::Formatter<'_>
&self
f
&mut std::fmt::Formatter<'_>