Skip to main content

OperatorState

Trait OperatorState 

Source
pub trait OperatorState: Send + Sync {
    // Required methods
    fn snapshot(&self) -> impl Future<Output = Result<Vec<u8>>> + Send;
    fn restore(
        &self,
        snapshot: &[u8],
    ) -> impl Future<Output = Result<()>> + Send;
}
Expand description

Operator state trait.

Required Methods§

Source

fn snapshot(&self) -> impl Future<Output = Result<Vec<u8>>> + Send

Snapshot the state.

Source

fn restore(&self, snapshot: &[u8]) -> impl Future<Output = Result<()>> + Send

Restore from a snapshot.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§