Trait vmcore::save_restore::SaveRestore

source ·
pub trait SaveRestore {
    type SavedState;

    // Required methods
    fn save(&mut self) -> Result<Self::SavedState, SaveError>;
    fn restore(&mut self, state: Self::SavedState) -> Result<(), RestoreError>;
}
Expand description

Implemented by objects which can be saved/restored

Required Associated Types§

source

type SavedState

The concrete saved state type.

Required Methods§

source

fn save(&mut self) -> Result<Self::SavedState, SaveError>

Saves the object’s state.

source

fn restore(&mut self, state: Self::SavedState) -> Result<(), RestoreError>

Restores the object’s state.

Implementors§