Trait vmcore::save_restore::ProtobufSaveRestore
source · pub trait ProtobufSaveRestore {
// Required methods
fn save(&mut self) -> Result<SavedStateBlob, SaveError>;
fn restore(&mut self, state: SavedStateBlob) -> Result<(), RestoreError>;
}
Expand description
Trait implemented by objects that implement SaveRestore
with an associated
type that can be serialized as a protobuf message.
Required Methods§
sourcefn save(&mut self) -> Result<SavedStateBlob, SaveError>
fn save(&mut self) -> Result<SavedStateBlob, SaveError>
Save the object.
sourcefn restore(&mut self, state: SavedStateBlob) -> Result<(), RestoreError>
fn restore(&mut self, state: SavedStateBlob) -> Result<(), RestoreError>
Restore the object.