use serde::{Deserialize, Serialize};
#[derive(Debug, Clone)]
pub struct StepContext<Backend> {
pub current_step: usize,
pub backend: Backend,
pub has_next: bool,
}
impl<B> StepContext<B> {
pub fn new(backend: B, idx: usize, has_next: bool) -> Self {
Self {
current_step: idx,
backend,
has_next,
}
}
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct WorkflowContext {
pub step_index: usize,
}