atypical-config 0.2.1

(Non)-standard enforcing DX
Documentation
atypical-config-0.2.1 has been yanked.

atypical-config

crates.io docs.rs

Discovery and loading of atypical.toml. This crate is schema-free: each tool owns its own section and deserializes it from here.

Usage

#[derive(serde::Deserialize)]
struct CommitConfig {
    keywords: Vec<String>,
}

// The nearest atypical.toml, from `start` upward.
let path = atypical_config::find(std::env::current_dir()?);

// The `[commit]` section of it; `None` when the section is absent.
if let Some(path) = path {
    let config: Option<CommitConfig> =
        atypical_config::load(path, "commit")?;
}

section does the same on an already-read document.

License

MIT OR Apache-2.0