@@ -13,10 +13,7 @@ use crate::{
13
13
config:: Config ,
14
14
pd:: { PdClient , PdRpcClient } ,
15
15
raw:: lowering:: * ,
16
- request:: {
17
- codec:: { RawCodec , RequestCodec } ,
18
- Collect , CollectSingle , Plan ,
19
- } ,
16
+ request:: { codec:: RawCodec , Collect , CollectSingle , Plan } ,
20
17
Backoff , BoundRange , ColumnFamily , Key , KvPair , Result , Value ,
21
18
} ;
22
19
@@ -29,7 +26,7 @@ const MAX_RAW_KV_SCAN_LIMIT: u32 = 10240;
29
26
///
30
27
/// The returned results of raw request methods are [`Future`](std::future::Future)s that must be
31
28
/// awaited to execute.
32
- pub struct Client < C , PdC : PdClient = PdRpcClient < C > > {
29
+ pub struct Client < C : RawCodec , PdC : PdClient = PdRpcClient < C > > {
33
30
rpc : Arc < PdC > ,
34
31
cf : Option < ColumnFamily > ,
35
32
/// Whether to use the [`atomic mode`](Client::with_atomic_for_cas).
@@ -38,7 +35,7 @@ pub struct Client<C, PdC: PdClient = PdRpcClient<C>> {
38
35
_phantom : PhantomData < C > ,
39
36
}
40
37
41
- impl < C : RequestCodec > Clone for Client < C > {
38
+ impl < C : RawCodec > Clone for Client < C > {
42
39
fn clone ( & self ) -> Self {
43
40
Self {
44
41
rpc : self . rpc . clone ( ) ,
0 commit comments