Trait SteppableStorage

Source
pub trait SteppableStorage<S: Storage, Codec, Compact, Input, Index> {
    // Required method
    fn push_step<T: Serialize + Send>(
        &mut self,
        step: StepRequest<T, Index>,
    ) -> impl Future<Output = Result<Parts<S::Context>, StepError>> + Send;

    // Provided method
    fn start_stepped(
        &mut self,
        step: Input,
    ) -> impl Future<Output = Result<Parts<S::Context>, StepError>> + Send
       where Input: Serialize + Send,
             Index: Default,
             Self: Send { ... }
}
Expand description

Helper trait that transforms a storage with stepping capability

Required Methods§

Source

fn push_step<T: Serialize + Send>( &mut self, step: StepRequest<T, Index>, ) -> impl Future<Output = Result<Parts<S::Context>, StepError>> + Send

Push a step with a custom index

Provided Methods§

Source

fn start_stepped( &mut self, step: Input, ) -> impl Future<Output = Result<Parts<S::Context>, StepError>> + Send
where Input: Serialize + Send, Index: Default, Self: Send,

Push the first step

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§

Source§

impl<S, Encode, Compact, Input, Index> SteppableStorage<S, Encode, Compact, Input, Index> for S
where S: Storage<Job = StepRequest<Compact, Index>, Codec = Encode> + Backend<Request<StepRequest<Compact, Index>, <S as Storage>::Context>> + Send, Encode: Codec<Compact = Compact>, Encode::Error: Error + Send + Sync + 'static, S::Error: Error + Send + Sync + 'static, Compact: Send, Index: Send,