Crate toml [−] [src]
A TOML-parsing library
This library is an implementation in Rust of a parser for TOML configuration files 1. It is focused around high quality errors including specific spans and detailed error messages when things go wrong.
This implementation currently passes the language agnostic test suite.
Example
let toml = r#" [test] foo = "bar" "#; let value = toml::Parser::new(toml).parse().unwrap(); println!("{:?}", value);
Conversions
This library also supports using the standard Encodable
and Decodable
traits with TOML values. This library provides the following conversion
capabilities:
String
=>toml::Value
- viaParser
toml::Value
=>String
- viaDisplay
toml::Value
=> rust object - viaDecoder
- rust object =>
toml::Value
- viaEncoder
Convenience functions for performing multiple conversions at a time are also provided.
Structs
Parser |
Parser for converting a string to a TOML |
ParserError |
A structure representing a parse error. |
Enums
Value |
Representation of a TOML value. |
Type Definitions
Array |
Type representing a TOML array, payload of the |
Table |
Type representing a TOML table, payload of the |