fn merge_properties(
        &self,
        user_config: &HashMap<String, String>,
        version: &Version,
        kind: &PropertyNameKind,
        role: Option<&str>,
    ) -> HashMap<String, String> {
        let mut merged_properties = HashMap::new();

        if let Ok(properties) =
            util::get_matching_properties(&self.property_specs, kind, role, version)
        {
            merged_properties.extend(properties)
        }

        if let Ok(dependencies) =
            util::get_matching_dependencies(&self.property_specs, user_config, version, kind)
        {
            merged_properties.extend(dependencies);
        }

        merged_properties.extend(user_config.clone());

        merged_properties
    }
/// Merge provided user config properties and available property spec (from JSON, YAML...)
/// depending on kind and role to be validated later.
///
/// # Arguments
///
/// * `user_config` - map with property name and values (the explicit user config properties)
/// * `version` - the current product version
/// * `kind` - property name kind provided by the user
/// * `role` - property role provided by the user
///
Merge provided user config properties and available property spec (from JSON, YAML...)
depending on kind and role to be validated later.
Merge provided user config properties and available property spec ( from JSON YAML ... ) depending on kind and role to be validated later .
fn merge_properties(
        &self,
        user_config: &HashMap<String, String>,
        version: &Version,
        kind: &PropertyNameKind,
        role: Option<&str>,
    ) -> HashMap<String, String> {
        let mut merged_properties = HashMap::new();
        if let Ok(properties) =
            util::get_matching_properties(&self.property_specs, kind, role, version)
        {
            merged_properties.extend(properties)
        }
        if let Ok(dependencies) =
            util::get_matching_dependencies(&self.property_specs, user_config, version, kind)
        {
            merged_properties.extend(dependencies);
        }
        merged_properties.extend(user_config.clone());
        merged_properties
    }
fn merge_properties ( & self , user_config : & HashMap < String , String > , version : & Version , kind : & PropertyNameKind , role : Option < & str > , ) -> HashMap < String , String > { let mut merged_properties = HashMap :: new ( ) ; if let Ok ( properties ) = util :: get_matching_properties ( & self . property_specs , kind , role , version ) { merged_properties . extend ( properties ) } if let Ok ( dependencies ) = util :: get_matching_dependencies ( & self . property_specs , user_config , version , kind ) { merged_properties . extend ( dependencies ) ; } merged_properties . extend ( user_config . clone ( ) ) ; merged_properties }
Merge provided user config properties and available property spec (from JSON, YAML...)
depending on kind and role to be validated later.
Merge provided user config properties and available property spec ( from JSON YAML ... ) depending on kind and role to be validated later .
&self
user_config
&HashMap<String, String>
version
&Version
kind
&PropertyNameKind
role
Option<&str>