pub fn read(json_file_path: &Path) -> Result<ThermalConfig, Error> {
        let mut buffer = String::new();
        File::open(&json_file_path)?.read_to_string(&mut buffer)?;

        let config = serde_json5::from_str::<ThermalConfig>(&buffer)?;
        config.validate()?;
        Ok(config)
    }
/// Read the supplied JSON file path and parse into a ThermalConfig instance.
///
/// Attempts to open, read, and parse the supplied JSON file into a valid ThermalConfig
/// instance. If a ThermalConfig instance could be created with the JSON configuration, then it
/// is also tested for validity. If a ThermalConfig instance could not be created, or validation
/// fails, then an error is returned.
Read the supplied JSON file path and parse into a ThermalConfig instance.
Attempts to open, read, and parse the supplied JSON file into a valid ThermalConfig
instance. If a ThermalConfig instance could be created with the JSON configuration, then it
is also tested for validity. If a ThermalConfig instance could not be created, or validation
fails, then an error is returned.
Read the supplied JSON file path and parse into a ThermalConfig instance . Attempts to open read and parse the supplied JSON file into a valid ThermalConfig instance . If a ThermalConfig instance could be created with the JSON configuration then it is also tested for validity . If a ThermalConfig instance could not be created or validation fails then an error is returned .
pub fn read(json_file_path: &Path) -> Result<ThermalConfig, Error> {
        let mut buffer = String::new();
        File::open(&json_file_path)?.read_to_string(&mut buffer)?;
        let config = serde_json5::from_str::<ThermalConfig>(&buffer)?;
        config.validate()?;
        Ok(config)
    }
pub fn read ( json_file_path : & Path ) -> Result < ThermalConfig , Error > { let mut buffer = String :: new ( ) ; File :: open ( & json_file_path ) ? . read_to_string ( & mut buffer ) ? ; let config = serde_json5 :: from_str :: < ThermalConfig > ( & buffer ) ? ; config . validate ( ) ? ; Ok ( config ) }
Read the supplied JSON file path and parse into a ThermalConfig instance.
Read the supplied JSON file path and parse into a ThermalConfig instance .
json_file_path
&Path
json_file_path
&Path