pub fn check_module() -> Result<String, String> {
        let modules = modules().unwrap();
        let rapl_modules = modules
            .iter()
            .filter(|(_, v)| {
                v.name == "intel_rapl"
                    || v.name == "intel_rapl_msr"
                    || v.name == "intel_rapl_common"
            })
            .collect::<HashMap<&String, &KernelModule>>();

        if !rapl_modules.is_empty() {
            Ok(String::from(
                "intel_rapl or intel_rapl_msr+intel_rapl_common modules found.",
            ))
        } else {
            Err(String::from(
                "None of intel_rapl, intel_rapl_common or intel_rapl_msr kernel modules found.",
            ))
        }
    }
/// Checks if intel_rapl modules are present and activated.
Checks if intel_rapl modules are present and activated.
Checks if intel_rapl modules are present and activated .
pub fn check_module() -> Result<String, String> {
        let modules = modules().unwrap();
        let rapl_modules = modules
            .iter()
            .filter(|(_, v)| {
                v.name == "intel_rapl"
                    || v.name == "intel_rapl_msr"
                    || v.name == "intel_rapl_common"
            })
            .collect::<HashMap<&String, &KernelModule>>();
        if !rapl_modules.is_empty() {
            Ok(String::from(
                "intel_rapl or intel_rapl_msr+intel_rapl_common modules found.",
            ))
        } else {
            Err(String::from(
                "None of intel_rapl, intel_rapl_common or intel_rapl_msr kernel modules found.",
            ))
        }
    }
pub fn check_module ( ) -> Result < String , String > { let modules = modules ( ) . unwrap ( ) ; let rapl_modules = modules . iter ( ) . filter ( | ( _ , v ) | { v . name == " " || v . name == " " || v . name == " " } ) . collect :: < HashMap < & String , & KernelModule > > ( ) ; if ! rapl_modules . is_empty ( ) { Ok ( String :: from ( " " , ) ) } else { Err ( String :: from ( " " , ) ) } }
Checks if intel_rapl modules are present and activated.
Checks if intel_rapl modules are present and activated .