bluejay_validator/executable/operation/
analyzer.rs1use crate::executable::operation::{VariableValues, Visitor};
2use bluejay_core::definition::SchemaDefinition;
3use bluejay_core::executable::ExecutableDocument;
4
5pub trait Analyzer<'a, E: ExecutableDocument, S: SchemaDefinition, V: VariableValues>:
6 Visitor<'a, E, S, V>
7{
8 type Output;
9
10 fn into_output(self) -> Self::Output;
11}
12
13macro_rules! impl_analyzer {
14 ($n:literal) => {
15 seq_macro::seq!(N in 0..$n {
16 impl<'a, E: ExecutableDocument, S: SchemaDefinition, V: VariableValues, #(T~N: Analyzer<'a, E, S, V>,)*> Analyzer<'a, E, S, V> for (#(T~N,)*) {
17 type Output = (#(T~N::Output,)*);
18
19 fn into_output(self) -> Self::Output {
20 (
21 #(self.N.into_output(),)*
22 )
23 }
24 }
25 });
26 }
27}
28
29seq_macro::seq!(N in 2..=10 {
30 impl_analyzer!(N);
31});