| 18 use super::aggregator::*; |
19 use super::aggregator::*; |
| 19 |
20 |
| 20 /// A structure for storing two [`SupportGenerator`]s summed/chain together. |
21 /// A structure for storing two [`SupportGenerator`]s summed/chain together. |
| 21 /// |
22 /// |
| 22 /// This is needed to work with sums of different types of [`Support`]s. |
23 /// This is needed to work with sums of different types of [`Support`]s. |
| 23 #[derive(Debug,Clone)] |
24 #[derive(Debug,Clone,Serialize,Deserialize)] |
| 24 pub struct BothGenerators<A, B>( |
25 pub struct BothGenerators<A, B>( |
| 25 pub(super) Arc<A>, |
26 pub(super) Arc<A>, |
| 26 pub(super) Arc<B>, |
27 pub(super) Arc<B>, |
| 27 ); |
28 ); |
| 28 |
29 |
| 29 /// A structure for a [`Support`] that can be either `A` or `B`. |
30 /// A structure for a [`Support`] that can be either `A` or `B`. |
| 30 /// |
31 /// |
| 31 /// This is needed to work with sums of different types of [`Support`]s. |
32 /// This is needed to work with sums of different types of [`Support`]s. |
| 32 #[derive(Debug,Clone)] |
33 #[derive(Debug,Clone,Serialize,Deserialize)] |
| 33 pub enum EitherSupport<A, B> { |
34 pub enum EitherSupport<A, B> { |
| 34 Left(A), |
35 Left(A), |
| 35 Right(B), |
36 Right(B), |
| 36 } |
37 } |
| 37 |
38 |