autodiff/
compose.rs

1pub trait AutoCompose<A>
2where
3    Self: Sized,
4{
5    type Output;
6    fn compose(self, _other: A) -> Self::Output;
7
8    /// alias for `compose`
9    fn o(self, other: A) -> Self::Output {
10        self.compose(other)
11    }
12    /// alias for `compose`
13    fn of(self, other: A) -> Self::Output {
14        self.compose(other)
15    }
16    /// alias for `compose`
17    fn after(self, other: A) -> Self::Output {
18        self.compose(other)
19    }
20    /// alias for `compose`
21    fn on(self, other: A) -> Self::Output {
22        self.compose(other)
23    }
24}
25
26pub trait FuncCompose<StaticArgs, Other>: Sized {
27    type Output;
28
29    // default implementation via proc macro uses `ADCompose`
30    fn func_compose(self, other: Other) -> Self::Output;
31}