pub fn from_file<P: AsRef<Path>>(toml_path: P) -> Result<I18nConfig, I18nConfigError> {
        let toml_path_final: &Path = toml_path.as_ref();
        let toml_str = read_to_string(toml_path_final)
            .map_err(|err| I18nConfigError::CannotReadFile(toml_path_final.to_path_buf(), err))?;
        let config: I18nConfig = toml::from_str(toml_str.as_ref()).map_err(|err| {
            I18nConfigError::CannotDeserializeToml(toml_path_final.to_path_buf(), err)
        })?;
        Ok(config)
    }
/// Load the config from the specified toml file path.
Load the config from the specified toml file path.
Load the config from the specified toml file path .
pub fn from_file<P: AsRef<Path>>(toml_path: P) -> Result<I18nConfig, I18nConfigError> {
        let toml_path_final: &Path = toml_path.as_ref();
        let toml_str = read_to_string(toml_path_final)
            .map_err(|err| I18nConfigError::CannotReadFile(toml_path_final.to_path_buf(), err))?;
        let config: I18nConfig = toml::from_str(toml_str.as_ref()).map_err(|err| {
            I18nConfigError::CannotDeserializeToml(toml_path_final.to_path_buf(), err)
        })?;
        Ok(config)
    }
pub fn from_file < P : AsRef < Path > > ( toml_path : P ) -> Result < I18nConfig , I18nConfigError > { let toml_path_final : & Path = toml_path . as_ref ( ) ; let toml_str = read_to_string ( toml_path_final ) . map_err ( | err | I18nConfigError :: CannotReadFile ( toml_path_final . to_path_buf ( ) , err ) ) ? ; let config : I18nConfig = toml :: from_str ( toml_str . as_ref ( ) ) . map_err ( | err | { I18nConfigError :: CannotDeserializeToml ( toml_path_final . to_path_buf ( ) , err ) } ) ? ; Ok ( config ) }
Load the config from the specified toml file path.
Load the config from the specified toml file path .
toml_path
P
toml_path
P