Skip to content

Commit f0d7f94

Browse files
committed
Rename async feature to aio and bump version
1 parent 5262ed7 commit f0d7f94

File tree

9 files changed

+36
-29
lines changed

9 files changed

+36
-29
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
All changes in this project will be noted in this file.
44

5-
## Unreleased
5+
## 0.7.0
6+
7+
### New features
8+
9+
- Sync connection pooling
10+
- Async connection pooling
611

712
### Breaking changes
813

914
- `SkyRawResult` is now `SkyResult`
1015
- `SkyResult` is now `SkyQueryResult`
16+
- The feature `async` is now `aio`
1117

1218
## Version 0.6.2
1319

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "Apache-2.0"
99
name = "skytable"
1010
readme = "README.md"
1111
repository = "https://github.com/skytable/client-rust"
12-
version = "0.6.2"
12+
version = "0.6.3"
1313

1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

@@ -22,7 +22,7 @@ pool = ["r2d2"]
2222
ssl = ["openssl"]
2323
sslv = ["openssl/vendored"]
2424
# async
25-
async = ["bytes", "tokio", "aio-pool"]
25+
aio = ["bytes", "tokio", "aio-pool"]
2626
aio-pool = ["bb8", "async-trait"]
2727
# async TLS
2828
aio-ssl = ["tokio-openssl", "openssl"]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cargo new skyapp
2626
First add this to your `Cargo.toml` file:
2727

2828
```toml
29-
skytable = "0.6.2"
29+
skytable = "0.6.3"
3030
```
3131

3232
Now open up your `src/main.rs` file and establish a connection to the server while also adding some
@@ -118,7 +118,7 @@ You can also find the [latest examples here](https://github.com/skytable/client-
118118
If you need to use an `async` API, just change your import to:
119119

120120
```toml
121-
skytable = { version = "0.6.2", features=["async"], default-features = false }
121+
skytable = { version = "0.6.3", features=["aio"], default-features = false }
122122
```
123123

124124
You can now establish a connection by using `skytable::AsyncConnection::new()`, adding `.await`s wherever
@@ -130,7 +130,7 @@ With this client driver, it is possible to use both sync and `async` APIs **at t
130130
this, simply change your import to:
131131

132132
```toml
133-
skytable = { version="0.6.2", features=["sync", "async"] }
133+
skytable = { version="0.6.3", features=["sync", "aio"] }
134134
```
135135

136136
## TLS
@@ -140,15 +140,15 @@ If you need to use TLS features, this crate will let you do so with OpenSSL.
140140
### Using TLS with sync interfaces
141141

142142
```toml
143-
skytable = { version="0.6.2", features=["sync","ssl"] }
143+
skytable = { version="0.6.3", features=["sync","ssl"] }
144144
```
145145

146146
You can now use the async `sync::TlsConnection` object.
147147

148148
### Using TLS with async interfaces
149149

150150
```toml
151-
skytable = { version="0.6.2", features=["async","aio-ssl"], default-features=false }
151+
skytable = { version="0.6.3", features=["aio","aio-ssl"], default-features=false }
152152
```
153153

154154
You can now use the async `aio::TlsConnection` object.

examples/aio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ edition = "2018"
88
[dependencies]
99
skytable = { git="https://github.com/skytable/client-rust.git", features = [
1010
"const-gen",
11-
"async",
11+
"aio",
1212
], default-features = false }
1313
tokio = { version = "1.10.0", features = ["full"] }

src/actions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ macro_rules! implement_actions {
109109
}
110110
)*
111111
}
112-
#[cfg(feature = "async")]
113-
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
112+
#[cfg(feature = "aio")]
113+
#[cfg_attr(docsrs, doc(cfg(feature = "aio")))]
114114
/// Actions that can be run on an [`AsyncSocket`] connection
115115
pub trait AsyncActions: AsyncSocket {
116116
$(

src/ddl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ macro_rules! implement_ddl {
187187
}
188188
)*
189189
}
190-
#[cfg(feature = "async")]
191-
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
190+
#[cfg(feature = "aio")]
191+
#[cfg_attr(docsrs, doc(cfg(feature = "aio")))]
192192
/// [DDL queries](https://docs.skytable.io/ddl) that can be run on async socket
193193
/// connections
194194
pub trait AsyncDdl: AsyncSocket {

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//!
3939
//! First add this to your `Cargo.toml` file:
4040
//! ```toml
41-
//! skytable = "0.6.2"
41+
//! skytable = "0.6.3"
4242
//! ```
4343
//! Now open up your `src/main.rs` file and establish a connection to the server while also adding some
4444
//! imports:
@@ -125,7 +125,7 @@
125125
//!
126126
//! If you need to use an `async` API, just change your import to:
127127
//! ```toml
128-
//! skytable = { version = "0.6.2", features=["async"], default-features=false }
128+
//! skytable = { version = "0.6.3", features=["aio"], default-features=false }
129129
//! ```
130130
//! You can now establish a connection by using `skytable::AsyncConnection::new()`, adding `.await`s wherever
131131
//! necessary. Do note that you'll the [Tokio runtime](https://tokio.rs).
@@ -135,7 +135,7 @@
135135
//! With this client driver, it is possible to use both sync and `async` APIs **at the same time**. To do
136136
//! this, simply change your import to:
137137
//! ```toml
138-
//! skytable = { version="0.6.2", features=["sync", "async"] }
138+
//! skytable = { version="0.6.3", features=["sync", "aio"] }
139139
//! ```
140140
//!
141141
//! ## TLS
@@ -144,13 +144,13 @@
144144
//!
145145
//! ### Using TLS with sync interfaces
146146
//! ```toml
147-
//! skytable = { version="0.6.2", features=["sync","ssl"] }
147+
//! skytable = { version="0.6.3", features=["sync","ssl"] }
148148
//! ```
149149
//! You can now use the async [TlsConnection](`sync::TlsConnection`) object.
150150
//!
151151
//! ### Using TLS with async interfaces
152152
//! ```toml
153-
//! skytable = { version="0.6.2", features=["async","aio-ssl"], default-features=false }
153+
//! skytable = { version="0.6.3", features=["aio","aio-ssl"], default-features=false }
154154
//! ```
155155
//! You can now use the async [TlsConnection](`aio::TlsConnection`) object.
156156
//!
@@ -184,7 +184,7 @@ pub mod error;
184184
#[cfg(any(
185185
feature = "sync",
186186
feature = "pool",
187-
feature = "async",
187+
feature = "aio",
188188
feature = "aio-pool"
189189
))]
190190
pub mod pool;

src/pool.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
//! # Connection pooling
1718
//!
1819
//! This module provides utilities to use connection pooling. As we already know, it is far more
@@ -21,8 +22,8 @@
2122
//! a worker receives a task is slow while maintaining a connection per worker might be cumbersome
2223
//! to implement.
2324
//!
24-
//! To provide connection pooling, we use [`r2d2`] for a sync connection pool while we use [`bb8`]
25-
//! to provide an async connection pool.
25+
//! To provide connection pooling, we use [`r2d2`] for a sync connection pool while we use
26+
//! [`bb8`](https://docs.rs/bb8) to provide an async connection pool.
2627
//!
2728
//! ## Sync usage
2829
//!
@@ -86,16 +87,16 @@ pub use self::sync_impls::{Pool, TlsPool};
8687
/// [`r2d2`](https://docs.rs/r2d2)'s error type
8788
pub use r2d2::Error as r2d2Error;
8889
// async
89-
#[cfg(any(feature = "async", feature = "aio-pool"))]
90+
#[cfg(any(feature = "aio", feature = "aio-pool"))]
9091
pub use self::async_impls::{Pool as AsyncPool, TlsPool as AsyncTlsPool};
91-
#[cfg(any(feature = "async", feature = "aio-pool"))]
92+
#[cfg(any(feature = "aio", feature = "aio-pool"))]
9293
/// [`bb8`](https://docs.rs/bb8)'s error type
9394
pub use bb8::RunError as bb8Error;
9495

9596
// imports
9697
use core::marker::PhantomData;
9798

98-
#[derive(Debug)]
99+
#[derive(Debug, Clone)]
99100
pub struct ConnectionManager<C> {
100101
host: String,
101102
port: u16,
@@ -185,7 +186,7 @@ mod sync_impls {
185186
}
186187
}
187188

188-
#[cfg(any(feature = "async", feature = "aio-pool"))]
189+
#[cfg(any(feature = "aio", feature = "aio-pool"))]
189190
mod async_impls {
190191
use super::ConnectionManager;
191192
use crate::aio::{Connection as AsyncConnection, TlsConnection as AsyncTlsConnection};

src/util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ macro_rules! cfg_ssl_any {
6464
macro_rules! cfg_async_ssl_any {
6565
($($body:item)*) => {
6666
$(
67-
#[cfg(all(feature = "async", any(feature = "aio-ssl", feature = "aio-sslv")))]
68-
#[cfg_attr(docsrs, doc(cfg(all(feature="async", any(feature = "aio-ssl", feature = "aio-sslv")))))]
67+
#[cfg(all(feature = "aio", any(feature = "aio-ssl", feature = "aio-sslv")))]
68+
#[cfg_attr(docsrs, doc(cfg(all(feature="aio", any(feature = "aio-ssl", feature = "aio-sslv")))))]
6969
$body
7070
)*
7171
};
@@ -84,8 +84,8 @@ macro_rules! cfg_sync {
8484
macro_rules! cfg_async {
8585
($($body:item)*) => {
8686
$(
87-
#[cfg(feature = "async")]
88-
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
87+
#[cfg(feature = "aio")]
88+
#[cfg_attr(docsrs, doc(cfg(feature = "aio")))]
8989
$body
9090
)*
9191
};

0 commit comments

Comments
 (0)