use sayiir_core::codec::sealed;
use sayiir_core::codec::{Codec, EnvelopeCodec};
use sayiir_core::workflow::{Workflow, WorkflowStatus};
use std::future::Future;
use crate::error::RuntimeError;
pub trait WorkflowRunner: Send + Sync {
fn run<'w, C, Input, M>(
&self,
workflow: &'w Workflow<C, Input, M>,
input: Input,
) -> impl Future<Output = Result<WorkflowStatus, RuntimeError>> + Send + 'w
where
Input: Send + 'static,
M: Send + Sync + 'static,
C: Codec + EnvelopeCodec + sealed::EncodeValue<Input>;
}
pub mod distributed;
pub mod ext;
pub mod in_process;
pub use ext::WorkflowRunExt;