@@ -21,8 +21,7 @@ use crate::{
2121 time:: Timestamp ,
2222 trace:: {
2323 cursor:: { Cursor , CursorGroup } ,
24- Spine ,
25- Batch , BatchReader , Builder ,
24+ Batch , BatchReader , Builder , Spine ,
2625 } ,
2726 NumEntries , OrdIndexedZSet , OrdZSet ,
2827} ;
@@ -110,8 +109,9 @@ where
110109 ) -> Stream < Circuit < P > , OrdIndexedZSet < Z :: Key , A :: Output , isize > >
111110 where
112111 Z : IndexedZSet + Send + ' static ,
113- Z :: Key : Ord + SizeOf + Clone + Hash ,
114- Z :: Val : Ord + SizeOf + Clone ,
112+ Z :: Key : Ord + SizeOf + Clone + Hash + bincode:: Decode + bincode:: Encode ,
113+ Z :: Val : Ord + SizeOf + Clone + bincode:: Decode + bincode:: Encode ,
114+ Z :: R : bincode:: Decode + bincode:: Encode ,
115115 A : Aggregator < Z :: Val , ( ) , Z :: R > + ' static ,
116116 A :: Output : Ord + SizeOf + Clone ,
117117 {
@@ -122,11 +122,12 @@ where
122122 pub fn stream_aggregate_generic < A , O > ( & self , aggregator : A ) -> Stream < Circuit < P > , O >
123123 where
124124 Z : IndexedZSet + Send + ' static ,
125- Z :: Key : Ord + Clone + Hash ,
126- Z :: Val : Ord + Clone ,
125+ Z :: Key : Ord + Clone + Hash + bincode:: Decode + bincode:: Encode ,
126+ Z :: Val : Ord + Clone + bincode:: Decode + bincode:: Encode ,
127+ Z :: R : bincode:: Decode + bincode:: Encode ,
127128 A : Aggregator < Z :: Val , ( ) , Z :: R > + ' static ,
128129 O : Clone + IndexedZSet < Key = Z :: Key , Val = A :: Output > + ' static ,
129- O :: R : ZRingValue ,
130+ O :: R : ZRingValue + bincode :: Decode + bincode :: Encode ,
130131 {
131132 self . circuit ( )
132133 . add_unary_operator ( Aggregate :: new ( aggregator) , & self . shard ( ) )
@@ -144,29 +145,29 @@ where
144145 aggregator : A ,
145146 ) -> Stream < Circuit < P > , OrdIndexedZSet < Z :: Key , A :: Output , isize > >
146147 where
147- TS : Timestamp + SizeOf ,
148+ TS : Timestamp + SizeOf + bincode :: Decode + bincode :: Encode ,
148149 Z : IndexedZSet + SizeOf + NumEntries + Send , /* + std::fmt::Display */
149- Z :: Key : PartialEq + Ord + Hash + Clone + SizeOf , /* + std::fmt::Display */
150- Z :: Val : Ord + Clone + SizeOf , /* + std::fmt::Debug */
151- Z :: R : SizeOf , /* + std::fmt::Display */
150+ Z :: Key : PartialEq + Ord + Hash + Clone + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
151+ Z :: Val : Ord + Clone + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Debug */
152+ Z :: R : SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
152153 A : Aggregator < Z :: Val , TS , Z :: R > + ' static ,
153- A :: Output : Ord + Clone + SizeOf + ' static ,
154+ A :: Output : Ord + Clone + SizeOf + bincode :: Decode + bincode :: Encode + ' static ,
154155 {
155156 self . aggregate_generic :: < TS , A , OrdIndexedZSet < Z :: Key , A :: Output , isize > > ( aggregator)
156157 }
157158
158159 /// Like [`Self::aggregate`], but can return any batch type.
159160 pub fn aggregate_generic < TS , A , O > ( & self , aggregator : A ) -> Stream < Circuit < P > , O >
160161 where
161- TS : Timestamp + SizeOf ,
162+ TS : Timestamp + SizeOf + bincode :: Decode + bincode :: Encode ,
162163 Z : IndexedZSet + SizeOf + NumEntries + Send , /* + std::fmt::Display */
163- Z :: Key : PartialEq + Ord + Hash + Clone + SizeOf , /* + std::fmt::Display */
164- Z :: Val : Ord + Clone + SizeOf , /* + std::fmt::Debug */
165- Z :: R : SizeOf , /* + std::fmt::Display */
164+ Z :: Key : PartialEq + Ord + Hash + Clone + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
165+ Z :: Val : Ord + Clone + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Debug */
166+ Z :: R : SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
166167 A : Aggregator < Z :: Val , TS , Z :: R > + ' static ,
167- A :: Output : Ord + Clone + SizeOf , /* + std::fmt::Display */
168+ A :: Output : Ord + Clone + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
168169 O : Batch < Key = Z :: Key , Val = A :: Output , Time = ( ) > + Clone + ' static ,
169- O :: R : ZRingValue + SizeOf , /* + std::fmt::Display */
170+ O :: R : ZRingValue + SizeOf + bincode :: Decode + bincode :: Encode , /* + std::fmt::Display */
170171 {
171172 let circuit = self . circuit ( ) ;
172173 let stream = self . shard ( ) ;
@@ -205,11 +206,18 @@ where
205206 f : F ,
206207 ) -> Stream < Circuit < P > , OrdIndexedZSet < Z :: Key , A , isize > >
207208 where
208- TS : Timestamp + SizeOf ,
209+ TS : Timestamp + SizeOf + bincode :: Decode + bincode :: Encode ,
209210 Z : IndexedZSet ,
210- Z :: Key : PartialEq + Ord + SizeOf + Hash + Clone + SizeOf + Send , /* + std::fmt::Display */
211- Z :: Val : Ord + SizeOf + Clone , /* + std::fmt::Display */
212- A : MulByRef < Z :: R , Output = A > + GroupValue + SizeOf + Ord + Send ,
211+ Z :: Key :
212+ PartialEq + Ord + Hash + Clone + SizeOf + Send + bincode:: Decode + bincode:: Encode , /* + std::fmt::Display */
213+ Z :: Val : Ord + Clone + SizeOf + bincode:: Decode + bincode:: Encode , /* + std::fmt::Display */
214+ A : MulByRef < Z :: R , Output = A >
215+ + GroupValue
216+ + SizeOf
217+ + Ord
218+ + Send
219+ + bincode:: Decode
220+ + bincode:: Encode ,
213221 F : Fn ( & Z :: Key , & Z :: Val ) -> A + Clone + ' static ,
214222 {
215223 self . aggregate_linear_generic :: < TS , _ , _ > ( f)
@@ -218,14 +226,26 @@ where
218226 /// Like [`Self::aggregate_linear`], but can return any batch type.
219227 pub fn aggregate_linear_generic < TS , F , O > ( & self , f : F ) -> Stream < Circuit < P > , O >
220228 where
221- TS : Timestamp + SizeOf ,
222- Z : IndexedZSet ,
223- Z :: Key : PartialEq + Ord + SizeOf + Hash + Clone + SizeOf + Send , /* + std::fmt::Display */
224229 Z :: Val : Ord + SizeOf + Clone , /* + std::fmt::Display */
225230 F : Fn ( & Z :: Key , & Z :: Val ) -> O :: Val + Clone + ' static ,
226231 O : Clone + Batch < Key = Z :: Key , Time = ( ) > + ' static ,
227232 O :: R : ZRingValue + SizeOf , /* + std::fmt::Display */
228233 O :: Val : MulByRef < Z :: R , Output = O :: Val > + GroupValue + SizeOf + Ord + Send , /* + std::fmt::Display */
234+ TS : Timestamp + SizeOf + bincode:: Decode + bincode:: Encode ,
235+ Z : IndexedZSet ,
236+ Z :: Key :
237+ PartialEq + Ord + SizeOf + Hash + Clone + Send + bincode:: Decode + bincode:: Encode , /* + std::fmt::Display */
238+ Z :: Val : Ord + SizeOf + Clone + bincode:: Decode + bincode:: Encode , /* + std::fmt::Display */
239+ F : Fn ( & Z :: Key , & Z :: Val ) -> O :: Val + Clone + ' static ,
240+ O : Clone + Batch < Key = Z :: Key , Time = ( ) > + ' static ,
241+ O :: R : ZRingValue + SizeOf + bincode:: Decode + bincode:: Encode , /* + std::fmt::Display */
242+ O :: Val : MulByRef < Z :: R , Output = O :: Val >
243+ + GroupValue
244+ + SizeOf
245+ + Ord
246+ + Send
247+ + bincode:: Decode
248+ + bincode:: Encode , /* + std::fmt::Display */
229249 {
230250 self . weigh ( f) . aggregate_generic :: < TS , _ , _ > ( WeightedCount )
231251 }
@@ -245,10 +265,10 @@ where
245265 pub fn weigh < F , T > ( & self , f : F ) -> Stream < Circuit < P > , OrdZSet < Z :: Key , T > >
246266 where
247267 Z : IndexedZSet ,
248- Z :: Key : Ord + SizeOf + Clone ,
249- Z :: Val : Ord + SizeOf + Clone ,
268+ Z :: Key : Ord + SizeOf + Clone + bincode :: Decode + bincode :: Encode ,
269+ Z :: Val : Ord + SizeOf + Clone + bincode :: Decode + bincode :: Encode ,
250270 F : Fn ( & Z :: Key , & Z :: Val ) -> T + ' static ,
251- T : MulByRef < Z :: R , Output = T > + MonoidValue + SizeOf ,
271+ T : MulByRef < Z :: R , Output = T > + MonoidValue + SizeOf + bincode :: Decode + bincode :: Encode ,
252272 {
253273 self . weigh_generic :: < _ , OrdZSet < _ , _ > > ( f)
254274 }
0 commit comments