Expand description
TOML serialization for facet using the new format architecture.
This is the successor to facet-toml, using the unified facet-format traits.
§Deserialization
use facet::Facet;
use facet_format_toml::from_str;
#[derive(Facet, Debug)]
struct Config {
name: String,
port: u16,
}
let toml = r#"
name = "my-app"
port = 8080
"#;
let config: Config = from_str(toml).unwrap();
assert_eq!(config.name, "my-app");
assert_eq!(config.port, 8080);Structs§
- Serialize
Options - Options for TOML serialization.
- Toml
Error - Error type for TOML operations.
- Toml
Parser - Streaming TOML parser backed by
toml_parser. - Toml
Probe - Probe stream for TOML.
- Toml
Serialize Error - Toml
Serializer - TOML serializer with configurable formatting options.
Enums§
- Toml
Error Kind - Specific error kinds for TOML operations