saving and loading library implemented

This commit is contained in:
2026-08-19 08:50:28 +01:00
parent 3e5079fd07
commit 412b77851b
3 changed files with 122 additions and 49 deletions

14
src/structs.rs Normal file
View File

@@ -0,0 +1,14 @@
use serde::{Deserialize, Serialize};
#[derive(Default, Deserialize, Serialize, Debug)]
pub struct Library {
pub current_shelf: u8,
pub shelves: Vec<Shelf>,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct Shelf {
pub id: u8,
pub name: String,
pub content: Vec<String>,
}