async fn is_network_up(&self, name: &str) -> Result<bool, Error> {
        let networks = self
            .list_networks(Some(ListNetworksOptions {
                filters: vec![("name", vec![name])].into_iter().collect(),
            }))
            .await?;
        // `filters` actually filter by substring, so we need to double-check the result.
        debug!("is_network_up {:#?}", networks);
        Ok(networks
            .into_iter()
            .filter_map(|network| network.name)
            .any(|candidate_name| candidate_name.as_str() == name))
    }
/// Check whether a network exists.
Check whether a network exists.
Check whether a network exists .
async fn is_network_up(&self, name: &str) -> Result<bool, Error> {
        let networks = self
            .list_networks(Some(ListNetworksOptions {
                filters: vec![("name", vec![name])].into_iter().collect(),
            }))
            .await?;
        // `filters` actually filter by substring, so we need to double-check the result.
        debug!("is_network_up {:#?}", networks);
        Ok(networks
            .into_iter()
            .filter_map(|network| network.name)
            .any(|candidate_name| candidate_name.as_str() == name))
    }
async fn is_network_up ( & self , name : & str ) -> Result < bool , Error > { let networks = self . list_networks ( Some ( ListNetworksOptions { filters : vec ! [ ( " " vec [ name ] ) ] . into_iter ( ) . collect ( ) , } ) ) . await ? ; // `filters` actually filter by substring, so we need to double-check the result. debug ! ( " " networks ) ; Ok ( networks . into_iter ( ) . filter_map ( | network | network . name ) . any ( | candidate_name | candidate_name . as_str ( ) == name ) ) }
Check whether a network exists.
Check whether a network exists .
&self
name
&str
&self
name
&str