rad/toml
TOML is a markup language used by the gleam
build
tool and rad
for configuration and recordkeeping.
Every Gleam project at a minimum has its own gleam.toml
config, which
both gleam
and rad
can read from and work with.
Types
Functions
pub fn decode(
from toml: Toml,
get key_path: List(String),
expect decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Result(a, Snag)
pub fn decode_every(
from toml: Toml,
get key_path: List(String),
expect decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Result(List(#(String, a)), Snag)
pub fn from_dynamic(
data: Dynamic,
) -> Result(Toml, List(DecodeError))
Results in a Toml
decoded from the given dynamic data
on
success, or
DecodeErrors
on failure.
pub fn parse_file(path: String) -> Result(Toml, Snag)