1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Shared TOML config loader for hjkl-based apps.
//!
//! Apps implement [`AppConfig`] on their config struct and call [`load`]
//! to read it from the platform's XDG config directory. Missing files
//! return `Default::default()` paired with [`ConfigSource::Defaults`] —
//! no file is ever auto-created. Use [`write_default`] explicitly if a
//! consumer wants to scaffold a starter config on user request.
//!
//! ```no_run
//! use hjkl_config::{AppConfig, load};
//! use serde::Deserialize;
//!
//! #[derive(Debug, Default, Deserialize)]
//! struct MyConfig {
//! greeting: String,
//! }
//!
//! impl AppConfig for MyConfig {
//! const APPLICATION: &'static str = "myapp";
//! }
//!
//! let (cfg, source) = load::<MyConfig>().unwrap();
//! ```
pub use ConfigError;
pub use ;
pub use ;
pub use write_key_at;