@@ -29,12 +29,12 @@ impl Client {
29
29
/// Create a new [`Client`](struct.Client.html) once the [`Connect`](struct.Connect.html) resolves.
30
30
///
31
31
/// ```rust,no_run
32
- /// # #![feature(async_await, await_macro )]
32
+ /// # #![feature(async_await)]
33
33
/// # use tikv_client::{Config, raw::Client};
34
34
/// # use futures::prelude::*;
35
35
/// # futures::executor::block_on(async {
36
36
/// let connect = Client::new(Config::default());
37
- /// let client = await!( connect) .unwrap();
37
+ /// let client = connect.await .unwrap();
38
38
/// # });
39
39
/// ```
40
40
#[ cfg_attr( feature = "cargo-clippy" , allow( clippy:: new_ret_no_self) ) ]
@@ -53,15 +53,15 @@ impl Client {
53
53
/// given key.
54
54
///
55
55
/// ```rust,no_run
56
- /// # #![feature(async_await, await_macro )]
56
+ /// # #![feature(async_await)]
57
57
/// # use tikv_client::{Value, Config, raw::Client};
58
58
/// # use futures::prelude::*;
59
59
/// # futures::executor::block_on(async {
60
60
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
61
- /// # let connected_client = await!( connecting_client) .unwrap();
61
+ /// # let connected_client = connecting_client.await .unwrap();
62
62
/// let key = "TiKV";
63
63
/// let req = connected_client.get(key);
64
- /// let result: Option<Value> = await!( req) .unwrap();
64
+ /// let result: Option<Value> = req.await .unwrap();
65
65
/// # });
66
66
/// ```
67
67
pub fn get ( & self , key : impl Into < Key > ) -> Get {
@@ -74,15 +74,15 @@ impl Client {
74
74
/// given keys.
75
75
///
76
76
/// ```rust,no_run
77
- /// # #![feature(async_await, await_macro )]
77
+ /// # #![feature(async_await)]
78
78
/// # use tikv_client::{KvPair, Config, raw::Client};
79
79
/// # use futures::prelude::*;
80
80
/// # futures::executor::block_on(async {
81
81
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
82
- /// # let connected_client = await!( connecting_client) .unwrap();
82
+ /// # let connected_client = connecting_client.await .unwrap();
83
83
/// let keys = vec!["TiKV", "TiDB"];
84
84
/// let req = connected_client.batch_get(keys);
85
- /// let result: Vec<KvPair> = await!( req) .unwrap();
85
+ /// let result: Vec<KvPair> = req.await .unwrap();
86
86
/// # });
87
87
/// ```
88
88
pub fn batch_get ( & self , keys : impl IntoIterator < Item = impl Into < Key > > ) -> BatchGet {
@@ -97,16 +97,16 @@ impl Client {
97
97
/// Once resolved this request will result in the setting of the value associated with the given key.
98
98
///
99
99
/// ```rust,no_run
100
- /// # #![feature(async_await, await_macro )]
100
+ /// # #![feature(async_await)]
101
101
/// # use tikv_client::{Key, Value, Config, raw::Client};
102
102
/// # use futures::prelude::*;
103
103
/// # futures::executor::block_on(async {
104
104
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
105
- /// # let connected_client = await!( connecting_client) .unwrap();
105
+ /// # let connected_client = connecting_client.await .unwrap();
106
106
/// let key = "TiKV";
107
107
/// let val = "TiKV";
108
108
/// let req = connected_client.put(key, val);
109
- /// let result: () = await!( req) .unwrap();
109
+ /// let result: () = req.await .unwrap();
110
110
/// # });
111
111
/// ```
112
112
pub fn put ( & self , key : impl Into < Key > , value : impl Into < Value > ) -> Put {
@@ -118,17 +118,17 @@ impl Client {
118
118
/// Once resolved this request will result in the setting of the value associated with the given key.
119
119
///
120
120
/// ```rust,no_run
121
- /// # #![feature(async_await, await_macro )]
121
+ /// # #![feature(async_await)]
122
122
/// # use tikv_client::{Error, Result, KvPair, Key, Value, Config, raw::Client};
123
123
/// # use futures::prelude::*;
124
124
/// # futures::executor::block_on(async {
125
125
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
126
- /// # let connected_client = await!( connecting_client) .unwrap();
126
+ /// # let connected_client = connecting_client.await .unwrap();
127
127
/// let kvpair1 = ("PD", "Go");
128
128
/// let kvpair2 = ("TiKV", "Rust");
129
129
/// let iterable = vec![kvpair1, kvpair2];
130
130
/// let req = connected_client.batch_put(iterable);
131
- /// let result: () = await!( req) .unwrap();
131
+ /// let result: () = req.await .unwrap();
132
132
/// # });
133
133
/// ```
134
134
pub fn batch_put ( & self , pairs : impl IntoIterator < Item = impl Into < KvPair > > ) -> BatchPut {
@@ -143,15 +143,15 @@ impl Client {
143
143
/// Once resolved this request will result in the deletion of the given key.
144
144
///
145
145
/// ```rust,no_run
146
- /// # #![feature(async_await, await_macro )]
146
+ /// # #![feature(async_await)]
147
147
/// # use tikv_client::{Key, Config, raw::Client};
148
148
/// # use futures::prelude::*;
149
149
/// # futures::executor::block_on(async {
150
150
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
151
- /// # let connected_client = await!( connecting_client) .unwrap();
151
+ /// # let connected_client = connecting_client.await .unwrap();
152
152
/// let key = "TiKV";
153
153
/// let req = connected_client.delete(key);
154
- /// let result: () = await!( req) .unwrap();
154
+ /// let result: () = req.await .unwrap();
155
155
/// # });
156
156
/// ```
157
157
pub fn delete ( & self , key : impl Into < Key > ) -> Delete {
@@ -163,15 +163,15 @@ impl Client {
163
163
/// Once resolved this request will result in the deletion of the given keys.
164
164
///
165
165
/// ```rust,no_run
166
- /// # #![feature(async_await, await_macro )]
166
+ /// # #![feature(async_await)]
167
167
/// # use tikv_client::{Config, raw::Client};
168
168
/// # use futures::prelude::*;
169
169
/// # futures::executor::block_on(async {
170
170
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
171
- /// # let connected_client = await!( connecting_client) .unwrap();
171
+ /// # let connected_client = connecting_client.await .unwrap();
172
172
/// let keys = vec!["TiKV", "TiDB"];
173
173
/// let req = connected_client.batch_delete(keys);
174
- /// let result: () = await!( req) .unwrap();
174
+ /// let result: () = req.await .unwrap();
175
175
/// # });
176
176
/// ```
177
177
pub fn batch_delete ( & self , keys : impl IntoIterator < Item = impl Into < Key > > ) -> BatchDelete {
@@ -186,15 +186,15 @@ impl Client {
186
186
/// Once resolved this request will result in a scanner over the given keys.
187
187
///
188
188
/// ```rust,no_run
189
- /// # #![feature(async_await, await_macro )]
189
+ /// # #![feature(async_await)]
190
190
/// # use tikv_client::{KvPair, Config, raw::Client};
191
191
/// # use futures::prelude::*;
192
192
/// # futures::executor::block_on(async {
193
193
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
194
- /// # let connected_client = await!( connecting_client) .unwrap();
194
+ /// # let connected_client = connecting_client.await .unwrap();
195
195
/// let inclusive_range = "TiKV"..="TiDB";
196
196
/// let req = connected_client.scan(inclusive_range, 2);
197
- /// let result: Vec<KvPair> = await!( req) .unwrap();
197
+ /// let result: Vec<KvPair> = req.await .unwrap();
198
198
/// # });
199
199
/// ```
200
200
pub fn scan ( & self , range : impl KeyRange , limit : u32 ) -> Scan {
@@ -206,17 +206,17 @@ impl Client {
206
206
/// Once resolved this request will result in a set of scanners over the given keys.
207
207
///
208
208
/// ```rust,no_run
209
- /// # #![feature(async_await, await_macro )]
209
+ /// # #![feature(async_await)]
210
210
/// # use tikv_client::{Key, Config, raw::Client};
211
211
/// # use futures::prelude::*;
212
212
/// # futures::executor::block_on(async {
213
213
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
214
- /// # let connected_client = await!( connecting_client) .unwrap();
214
+ /// # let connected_client = connecting_client.await .unwrap();
215
215
/// let inclusive_range1 = "TiDB"..="TiKV";
216
216
/// let inclusive_range2 = "TiKV"..="TiSpark";
217
217
/// let iterable = vec![inclusive_range1, inclusive_range2];
218
218
/// let req = connected_client.batch_scan(iterable, 2);
219
- /// let result = await!( req) ;
219
+ /// let result = req.await ;
220
220
/// # });
221
221
/// ```
222
222
pub fn batch_scan (
@@ -238,15 +238,15 @@ impl Client {
238
238
/// Once resolved this request will result in the deletion of all keys over the given range.
239
239
///
240
240
/// ```rust,no_run
241
- /// # #![feature(async_await, await_macro )]
241
+ /// # #![feature(async_await)]
242
242
/// # use tikv_client::{Key, Config, raw::Client};
243
243
/// # use futures::prelude::*;
244
244
/// # futures::executor::block_on(async {
245
245
/// # let connecting_client = Client::new(Config::new(vec!["192.168.0.100", "192.168.0.101"]));
246
- /// # let connected_client = await!( connecting_client) .unwrap();
246
+ /// # let connected_client = connecting_client.await .unwrap();
247
247
/// let inclusive_range = "TiKV"..="TiDB";
248
248
/// let req = connected_client.delete_range(inclusive_range);
249
- /// let result: () = await!( req) .unwrap();
249
+ /// let result: () = req.await .unwrap();
250
250
/// # });
251
251
/// ```
252
252
pub fn delete_range ( & self , range : impl KeyRange ) -> DeleteRange {
@@ -259,13 +259,13 @@ impl Client {
259
259
/// Once resolved it will result in a connected [`Client`](struct.Client.html).
260
260
///
261
261
/// ```rust,no_run
262
- /// # #![feature(async_await, await_macro )]
262
+ /// # #![feature(async_await)]
263
263
/// use tikv_client::{Config, raw::{Client, Connect}};
264
264
/// use futures::prelude::*;
265
265
///
266
266
/// # futures::executor::block_on(async {
267
267
/// let connect: Connect = Client::new(Config::default());
268
- /// let client: Client = await!( connect) .unwrap();
268
+ /// let client: Client = connect.await .unwrap();
269
269
/// # });
270
270
/// ```
271
271
pub struct Connect {
0 commit comments