diff options
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 { |
