Crate kv_parser

Crate kv_parser 

Source
Expand description

A simple parser for key-value files.

This crate provides a function to parse simple text files containing key-value pairs into a hash map. Each line in the file should contain a key and value separated by whitespace.

§Examples

use kv_parser::file_to_key_value_map;
use std::path::Path;

let path = Path::new("config.txt");
let config = file_to_key_value_map(path)?;

Enums§

Error
Errors that can occur during key-value file parsing.

Functions§

file_to_key_value_map
Parses a key-value file into a hash map.