pub trait AppletPersist<T>where
T: DeserializeOwned + Serialize,{
// Required method
fn persistable_state(&mut self) -> &mut T;
// Provided methods
fn pre_persist(&mut self) { ... }
fn post_restore(&mut self) { ... }
}Expand description
Persistable applet state accessor
Required Methods§
Sourcefn persistable_state(&mut self) -> &mut T
fn persistable_state(&mut self) -> &mut T
Accessor to Serde-serializable structure for serializing and deserializing state
Provided Methods§
Sourcefn pre_persist(&mut self)
fn pre_persist(&mut self)
Optional callback just before state is persisted
Sourcefn post_restore(&mut self)
fn post_restore(&mut self)
Optional callback after state has een restored