2023-11-12 14:03:02 -05:00
|
|
|
use serde::Deserialize;
|
|
|
|
use std::fs;
|
|
|
|
use toml;
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
struct Sbemails {
|
|
|
|
emails: Vec<Emails>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
struct Emails {
|
|
|
|
number: u8,
|
|
|
|
title: String,
|
|
|
|
}
|
|
|
|
|
2023-11-11 09:28:40 -05:00
|
|
|
fn main() {
|
|
|
|
println!("Preeeeow, world.");
|
2023-11-12 14:03:02 -05:00
|
|
|
let toml_file = fs::read_to_string("src/sbemails.toml").expect("failed to read sbemails.toml");
|
|
|
|
let sbemails: Sbemails = toml::from_str(&toml_file).expect("failed to deserialize sbemails.toml");
|
|
|
|
println!("{:#?}", sbemails);
|
2023-11-11 09:28:40 -05:00
|
|
|
}
|
2023-11-12 14:03:02 -05:00
|
|
|
|