@@ -12,6 +12,7 @@ use super::RawRpcRequest;
12
12
use crate :: {
13
13
collect_first,
14
14
pd:: PdClient ,
15
+ plain_request, plain_response,
15
16
request:: {
16
17
plan:: ResponseWithShard , request_codec:: RequestCodec , Collect , CollectSingle ,
17
18
DefaultProcessor , KvRequest , Merge , Process , Shardable , SingleKey ,
@@ -39,11 +40,13 @@ where
39
40
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawGetRequest {
40
41
type Response = kvrpcpb:: RawGetResponse ;
41
42
42
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
43
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
44
+ plain_request ! ( self , codec) ;
43
45
todo ! ( )
44
46
}
45
47
46
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
48
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
49
+ plain_response ! ( resp, codec) ;
47
50
todo ! ( )
48
51
}
49
52
}
@@ -87,11 +90,13 @@ where
87
90
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawBatchGetRequest {
88
91
type Response = kvrpcpb:: RawBatchGetResponse ;
89
92
90
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
93
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
94
+ plain_request ! ( self , codec) ;
91
95
todo ! ( )
92
96
}
93
97
94
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
98
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
99
+ plain_response ! ( resp, codec) ;
95
100
todo ! ( )
96
101
}
97
102
}
@@ -130,11 +135,13 @@ where
130
135
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawPutRequest {
131
136
type Response = kvrpcpb:: RawPutResponse ;
132
137
133
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
138
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
139
+ plain_request ! ( self , codec) ;
134
140
todo ! ( )
135
141
}
136
142
137
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
143
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
144
+ plain_response ! ( resp, codec) ;
138
145
todo ! ( )
139
146
}
140
147
}
@@ -166,11 +173,13 @@ where
166
173
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawBatchPutRequest {
167
174
type Response = kvrpcpb:: RawBatchPutResponse ;
168
175
169
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
176
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
177
+ plain_request ! ( self , codec) ;
170
178
todo ! ( )
171
179
}
172
180
173
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
181
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
182
+ plain_response ! ( resp, codec) ;
174
183
todo ! ( )
175
184
}
176
185
}
@@ -216,11 +225,13 @@ where
216
225
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawDeleteRequest {
217
226
type Response = kvrpcpb:: RawDeleteResponse ;
218
227
219
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
228
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
229
+ plain_request ! ( self , codec) ;
220
230
todo ! ( )
221
231
}
222
232
223
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
233
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
234
+ plain_response ! ( resp, codec) ;
224
235
todo ! ( )
225
236
}
226
237
}
@@ -250,11 +261,13 @@ where
250
261
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawBatchDeleteRequest {
251
262
type Response = kvrpcpb:: RawBatchDeleteResponse ;
252
263
253
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
264
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
265
+ plain_request ! ( self , codec) ;
254
266
todo ! ( )
255
267
}
256
268
257
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
269
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
270
+ plain_response ! ( resp, codec) ;
258
271
todo ! ( )
259
272
}
260
273
}
@@ -280,11 +293,13 @@ where
280
293
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawDeleteRangeRequest {
281
294
type Response = kvrpcpb:: RawDeleteRangeResponse ;
282
295
283
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
296
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
297
+ plain_request ! ( self , codec) ;
284
298
todo ! ( )
285
299
}
286
300
287
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
301
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
302
+ plain_response ! ( resp, codec) ;
288
303
todo ! ( )
289
304
}
290
305
}
@@ -314,11 +329,13 @@ where
314
329
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawScanRequest {
315
330
type Response = kvrpcpb:: RawScanResponse ;
316
331
317
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
332
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
333
+ plain_request ! ( self , codec) ;
318
334
todo ! ( )
319
335
}
320
336
321
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
337
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
338
+ plain_response ! ( resp, codec) ;
322
339
todo ! ( )
323
340
}
324
341
}
@@ -357,11 +374,13 @@ where
357
374
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawBatchScanRequest {
358
375
type Response = kvrpcpb:: RawBatchScanResponse ;
359
376
360
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
377
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
378
+ plain_request ! ( self , codec) ;
361
379
todo ! ( )
362
380
}
363
381
364
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
382
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
383
+ plain_response ! ( resp, codec) ;
365
384
todo ! ( )
366
385
}
367
386
}
@@ -417,11 +436,13 @@ where
417
436
impl < C : RequestCodec > KvRequest < C > for kvrpcpb:: RawCasRequest {
418
437
type Response = kvrpcpb:: RawCasResponse ;
419
438
420
- fn encode_request ( & self , _codec : & C ) -> Cow < Self > {
439
+ fn encode_request ( & self , codec : & C ) -> Cow < Self > {
440
+ plain_request ! ( self , codec) ;
421
441
todo ! ( )
422
442
}
423
443
424
- fn decode_response ( & self , _codec : & C , _resp : Self :: Response ) -> Result < Self :: Response > {
444
+ fn decode_response ( & self , codec : & C , resp : Self :: Response ) -> Result < Self :: Response > {
445
+ plain_response ! ( resp, codec) ;
425
446
todo ! ( )
426
447
}
427
448
}
0 commit comments