notesy::toml

Reading and writing TOML. Needs nothing.

rustuse notesy::{log, toml};

pub fn ready() {
    let config = toml::parse("title = \"Plan\"\ncount = 3\n[owner]\nname = \"Ana\"\n")?;
    log::info(`${config.title}, by ${config.owner.name}`);
    log::info(toml::text(#{ count: 4, tags: ["a", "b"] })?);
}
Function What it does
toml::parse(text) Ok(value): an object, as TOML always is at the top, of objects, lists, text, numbers, and true and false. Dates and times come as their text ("2026-09-12"). Err(why) for text that isn't TOML.
toml::text(value) Ok(text): an object written as TOML. Err(why) for anything that isn't an object at the top.

At most 1 MB of text.

Every page