strongbad_email/src/main.rs

23 lines
493 B
Rust
Raw Normal View History

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.");
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
}