pub trait MobileObject: DistributedObject {
type Snapshot: WireValue;
const MOBILITY: Mobility;
const SNAPSHOT_VERSION: u32;
// Required methods
fn freeze(&mut self) -> Result<Self::Snapshot, ActionError>;
fn restore(
snapshot: Self::Snapshot,
context: RestoreContext,
) -> Result<Self, ActionError>;
}Expand description
Logical object state that can be frozen and restored at another Place.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn freeze(&mut self) -> Result<Self::Snapshot, ActionError>
fn freeze(&mut self) -> Result<Self::Snapshot, ActionError>
Produces a versioned logical snapshot while runtime admission is closed.
§Errors
Returns ActionError when logical state cannot be snapshotted.
Sourcefn restore(
snapshot: Self::Snapshot,
context: RestoreContext,
) -> Result<Self, ActionError>
fn restore( snapshot: Self::Snapshot, context: RestoreContext, ) -> Result<Self, ActionError>
Restores logical state and rebuilds destination-local resources.
§Errors
Returns ActionError when the snapshot is invalid or a required
destination-local resource cannot be reconstructed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".