vc_processors/core/
mod.rs1use std::fmt::Debug;
5
6use anyhow::Result;
7use serde::{de::DeserializeOwned, Serialize};
8
9pub mod ext;
10
11pub trait Task
13where
14 Self: Serialize + DeserializeOwned + Debug + Send + Sync + 'static,
15 Self::Output: Serialize + DeserializeOwned + Debug + Send + Sync + 'static,
16{
17 const STAGE: &'static str;
19
20 type Output;
22}
23
24pub trait Processor<T: Task>
26where
27 Self: Send + Sync,
28{
29 fn process(&self, task: T) -> Result<<T as Task>::Output>;
31}