1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*!

[](https://crates.io/crates/alopecosa/)

# Alopecosa
Alopecosa is a convenient async pure-rust [Tarantool 1.6+](https://www.tarantool.io) connector built on tokio (version 1).
By the way, [alopecosa](https://en.wikipedia.org/wiki/Alopecosa) is the kind of tarantula that inhabits in Japan.
[Documentation link](https://docs.rs/alopecosa/)
[Crates.io link](https://crates.io/crates/alopecosa/)
## Example
```rust
use std::{
error::Error,
time::Duration,
sync::Arc,
};
use alopecosa::{
Connection, Connector, IntoTuple,
Call, Eval, Select, Iterator
};
use tokio::time::timeout;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let addr = "127.0.0.1:3301".parse()?;
let conn: Arc<Connection> = Connector::new(addr)
.connect().await?;
let eval_resp: (u32, u32) = conn.eval(Eval {
expr: "return 1, 2".into(),
args: ().into_tuple(),
}).await?;
let select_resp: Vec<(u32, u32, u32)> = conn.select(Select {
space_id: 512, index_id: 0,
limit: 100, offset: 0,
iterator: Iterator::Ge,
keys: ( 1u64, ).into_tuple(),
}).await?;
let (resp_with_timeout,): (i32,) = timeout(
Duration::from_secs(1),
conn.call(Call {
function: "echo".into(),
args: ( 123, ).into_tuple(),
})
).await??;
Ok(())
}
```
## Auth
```rust
let addr = "127.0.0.1:3301".parse()?;
let conn: Arc<Connection> = Connector::new(addr)
.with_auth("user".into(), "password".into())
.connect().await?;
```
## Connection tuning
```rust
let addr = "127.0.0.1:3301".parse()?;
let conn: Arc<Connection> = Connector::new(addr)
.with_connect_timeout(Duration::from_secs(10))
.with_reconnect_interval(Duration::from_secs(1))
.with_send_request_timeout(Duration::from_secs(10))
.connect().await?;
```
*/
pub use ;
pub use ;