async fn read_config(
        net_id: NetworkIdentifier,
        stash_node: &StashNode,
    ) -> Result<NetworkConfig, Error> {
        let fields = stash_node.fields().await?;
        let data = fields.get_str(DATA).ok_or_else(|| format_err!("failed to config's data"))?;
        let data: PersistentData = serde_json::from_str(data).map_err(|e| format_err!("{}", e))?;
        data.into_config_with_id(net_id)
    }
/// Read persisting data of a given StashNode and use it to build a network config.
Read persisting data of a given StashNode and use it to build a network config.
Read persisting data of a given StashNode and use it to build a network config .
async fn read_config(
        net_id: NetworkIdentifier,
        stash_node: &StashNode,
    ) -> Result<NetworkConfig, Error> {
        let fields = stash_node.fields().await?;
        let data = fields.get_str(DATA).ok_or_else(|| format_err!("failed to config's data"))?;
        let data: PersistentData = serde_json::from_str(data).map_err(|e| format_err!("{}", e))?;
        data.into_config_with_id(net_id)
    }
async fn read_config ( net_id : NetworkIdentifier , stash_node : & StashNode , ) -> Result < NetworkConfig , Error > { let fields = stash_node . fields ( ) . await ? ; let data = fields . get_str ( DATA ) . ok_or_else ( | | format_err ! ( " " ) ) ? ; let data : PersistentData = serde_json :: from_str ( data ) . map_err ( | e | format_err ! ( " " e ) ) ? ; data . into_config_with_id ( net_id ) }
Read persisting data of a given StashNode and use it to build a network config.
Read persisting data of a given StashNode and use it to build a network config .
net_id
NetworkIdentifier
stash_node
&StashNode
net_id
NetworkIdentifier
stash_node
&StashNode