summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorSerguey Parkhomovsky <xindigo@gmail.com>2026-03-03 20:51:07 -0800
committerSerguey Parkhomovsky <xindigo@gmail.com>2026-03-03 20:51:07 -0800
commitb0e11d29dfc5f2cf9678872e782be2ed0625ef30 (patch)
tree74d8c0fa198e08023933f8c049849639788687e7 /src/lib.rs
parent7c3f6431c0f162eadffda456366c1071eaf9dfe8 (diff)
get it to build
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 819fc96..9d85c3e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -12,6 +12,12 @@ pub struct Config {
pub printers: Vec<Printer>,
}
+impl Config {
+ pub fn load(toml: &str) -> Config {
+ toml::from_str(toml).expect("Couldn't parse config.toml")
+ }
+}
+
#[derive(Debug, Deserialize)]
#[serde(tag = "type", rename_all = "lowercase")]
pub enum Printer {