1 2 3 4 5 6 7 8 9 10 11 12
pub mod local; use crate::Mind; use std::io; pub trait Storage { fn init() -> io::Result<Self> where Self: Sized; fn load(&self) -> io::Result<Mind>; fn save(&self, mind: Mind) -> io::Result<()>; }
1 2 3 4 5 6 7 8 9 10 11 12
pub mod local; use crate::Mind; use std::io; pub trait Storage { fn init() -> io::Result<Self> where Self: Sized; fn load(&self) -> io::Result<Mind>; fn save(&self, mind: Mind) -> io::Result<()>; }