pub trait StateSaver<T>: 'static { // Required methods fn save(&self, value: &T) -> Box<dyn Any>; fn restore(&self, saved: &dyn Any) -> Option<T>; }