rsdiff_core/ops/kinds/ternary/
mod.rs

1/*
2   Appellation: ternary <mod>
3   Contrib: FL03 <jo3mccain@icloud.com>
4*/
5pub use self::kinds::*;
6
7pub(crate) mod kinds;
8
9// use super::{Evaluator, Operator, Params};
10
11pub trait ApplyTernary<A, B = A, C = A> {
12    type Output;
13
14    fn apply(&self, a: A, b: B, c: C) -> Self::Output;
15}
16
17pub struct TernaryArgs<A, B, C>(pub A, pub B, pub C);
18
19// impl<S, P, A, B, C, D> Evaluator<P> for S
20// where
21//     P: Params<Pattern = (A, B, C)>,
22//     S: Operator + Ternary<A, B, C, Output = D>,
23// {
24//     type Output = <Self as Ternary<A, B, C>>::Output;
25
26//     fn eval(&self, args: P) -> Self::Output {
27//         let (a, b, c) = args.into_pattern();
28//         self.apply(a, b, c)
29//     }
30// }