#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ChainKind {
Then,
Fork,
}
#[derive(Debug, Clone, Copy)]
pub struct ChainStep {
pub name: &'static str,
pub kind: ChainKind,
}
#[derive(Debug, Clone, Copy)]
pub struct JigMeta {
pub name: &'static str,
pub file: &'static str,
pub line: u32,
pub kind: &'static str,
pub input: &'static str,
pub input_type: &'static str,
pub output_type: &'static str,
pub is_async: bool,
pub module: &'static str,
pub chain: &'static [ChainStep],
}
impl JigMeta {
pub fn chain_names(&self) -> impl Iterator<Item = &'static str> + '_ {
self.chain.iter().map(|s| s.name)
}
}
pub trait JigDef {
const META: JigMeta;
fn collect(out: &mut Vec<&'static JigMeta>);
}