Skip to content

Commit 7ac4d45

Browse files
authored
Merge pull request #1163 from wprzytula/restructure-modules
Restructure modules - purge `transport` module
2 parents 57ad5ad + 005354d commit 7ac4d45

File tree

156 files changed

+2151
-1921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2151
-1921
lines changed

docs/source/connecting/authentication.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ To use the default authentication, specify credentials using the `user` method i
1010
# extern crate tokio;
1111
# use std::error::Error;
1212
# async fn check_only_compiles() -> Result<(), Box<dyn Error>> {
13-
use scylla::{Session, SessionBuilder};
13+
use scylla::client::session::Session;
14+
use scylla::client::session_builder::SessionBuilder;
1415

1516
let session: Session = SessionBuilder::new()
1617
.known_node("127.0.0.1:9042")
@@ -21,7 +22,8 @@ let session: Session = SessionBuilder::new()
2122
# Ok(())
2223
# }
2324
```
24-
### Custom Authentication
25+
26+
### Custom Authentication
2527

2628
A custom authentication is defined by implementing the `AuthenticatorSession`.
2729
An `AuthenticatorSession` instance is created per session, so it is also necessary to define a `AuthenticatorProvider` for it.
@@ -79,7 +81,8 @@ impl AuthenticatorProvider for CustomAuthenticatorProvider {
7981
}
8082

8183
async fn authentication_example() -> Result<(), Box<dyn Error>> {
82-
use scylla::{Session, SessionBuilder};
84+
use scylla::client::session::Session;
85+
use scylla::client::session_builder::SessionBuilder;
8386

8487
let _session: Session = SessionBuilder::new()
8588
.known_node("127.0.0.1:9042")

docs/source/connecting/compression.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ An example enabling `Snappy` compression algorithm:
1212
```rust
1313
# extern crate scylla;
1414
# extern crate tokio;
15-
use scylla::{Session, SessionBuilder};
16-
use scylla::transport::Compression;
15+
use scylla::client::session::Session;
16+
use scylla::client::session_builder::SessionBuilder;
17+
use scylla::client::Compression;
1718
use std::error::Error;
1819

1920
#[tokio::main]

docs/source/connecting/connecting.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ When creating a `Session` you can specify a few known nodes to which the driver
55
```rust
66
# extern crate scylla;
77
# extern crate tokio;
8-
use scylla::{Session, SessionBuilder};
8+
use scylla::client::session::Session;
9+
use scylla::client::session_builder::SessionBuilder;
910
use std::error::Error;
1011
use std::time::Duration;
1112
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
@@ -66,7 +67,7 @@ specify the secure connection bundle as follows:
6667
# fn check_only_compiles() {
6768
use std::path::Path;
6869
use std::error::Error;
69-
use scylla::CloudSessionBuilder;
70+
use scylla::client::session_builder::CloudSessionBuilder;
7071

7172
#[tokio::main]
7273
async fn main() -> Result<(), Box<dyn Error>> {

docs/source/connecting/tls.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ For example, if database certificate is in the file `ca.crt`:
4646
```rust
4747
# extern crate scylla;
4848
# extern crate openssl;
49-
use scylla::{Session, SessionBuilder};
49+
use scylla::client::session::Session;
50+
use scylla::client::session_builder::SessionBuilder;
5051
use openssl::ssl::{SslContextBuilder, SslMethod, SslVerifyMode};
5152
use std::path::PathBuf;
5253

docs/source/data-types/blob.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```rust
66
# extern crate scylla;
77
# extern crate futures;
8-
# use scylla::Session;
8+
# use scylla::client::session::Session;
99
# use std::error::Error;
1010
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1111
use futures::TryStreamExt;

docs/source/data-types/collections.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
```rust
77
# extern crate scylla;
88
# extern crate futures;
9-
# use scylla::Session;
9+
# use scylla::client::session::Session;
1010
# use std::error::Error;
1111
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1212
use futures::TryStreamExt;
@@ -34,7 +34,7 @@ while let Some((list_value,)) = stream.try_next().await? {
3434
```rust
3535
# extern crate scylla;
3636
# extern crate futures;
37-
# use scylla::Session;
37+
# use scylla::client::session::Session;
3838
# use std::error::Error;
3939
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
4040
use futures::TryStreamExt;
@@ -59,7 +59,7 @@ while let Some((set_value,)) = stream.try_next().await? {
5959
```rust
6060
# extern crate scylla;
6161
# extern crate futures;
62-
# use scylla::Session;
62+
# use scylla::client::session::Session;
6363
# use std::error::Error;
6464
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
6565
use futures::TryStreamExt;
@@ -85,7 +85,7 @@ while let Some((set_value,)) = iter.try_next().await? {
8585
```rust
8686
# extern crate scylla;
8787
# extern crate futures;
88-
# use scylla::Session;
88+
# use scylla::client::session::Session;
8989
# use std::error::Error;
9090
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
9191
use futures::TryStreamExt;
@@ -114,7 +114,7 @@ while let Some((set_value,)) = iter.try_next().await? {
114114
```rust
115115
# extern crate scylla;
116116
# extern crate futures;
117-
# use scylla::Session;
117+
# use scylla::client::session::Session;
118118
# use std::error::Error;
119119
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
120120
use futures::TryStreamExt;
@@ -142,7 +142,7 @@ while let Some((map_value,)) = iter.try_next().await? {
142142
```rust
143143
# extern crate scylla;
144144
# extern crate futures;
145-
# use scylla::Session;
145+
# use scylla::client::session::Session;
146146
# use std::error::Error;
147147
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
148148
use futures::TryStreamExt;

docs/source/data-types/counter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```rust
66
# extern crate scylla;
77
# extern crate futures;
8-
# use scylla::Session;
8+
# use scylla::client::session::Session;
99
# use std::error::Error;
1010
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1111
use futures::TryStreamExt;

docs/source/data-types/date.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ However, for most use cases other types are more practical. See following sectio
1515
```rust
1616
# extern crate scylla;
1717
# extern crate futures;
18-
# use scylla::Session;
18+
# use scylla::client::session::Session;
1919
# use std::error::Error;
2020
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
2121
use scylla::frame::value::CqlDate;
@@ -51,7 +51,7 @@ If full range is not required and `chrono-04` feature is enabled,
5151
# extern crate chrono;
5252
# extern crate scylla;
5353
# extern crate futures;
54-
# use scylla::Session;
54+
# use scylla::client::session::Session;
5555
# use std::error::Error;
5656
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
5757
use chrono::NaiveDate;
@@ -87,7 +87,7 @@ documentation to get more info.
8787
# extern crate scylla;
8888
# extern crate time;
8989
# extern crate futures;
90-
# use scylla::Session;
90+
# use scylla::client::session::Session;
9191
# use std::error::Error;
9292
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
9393
use futures::TryStreamExt;

docs/source/data-types/decimal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Without any feature flags, the user can interact with `decimal` type by making u
88
```rust
99
# extern crate scylla;
1010
# extern crate futures;
11-
# use scylla::Session;
11+
# use scylla::client::session::Session;
1212
# use std::error::Error;
1313
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1414
use futures::TryStreamExt;
@@ -41,7 +41,7 @@ To make use of `bigdecimal::Bigdecimal` type, user should enable `bigdecimal-04`
4141
# extern crate scylla;
4242
# extern crate bigdecimal;
4343
# extern crate futures;
44-
# use scylla::Session;
44+
# use scylla::client::session::Session;
4545
# use std::error::Error;
4646
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
4747
use futures::TryStreamExt;

docs/source/data-types/duration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
```rust
55
# extern crate scylla;
66
# extern crate futures;
7-
# use scylla::Session;
7+
# use scylla::client::session::Session;
88
# use std::error::Error;
99
# async fn check_only_compiles(session: &Session) -> Result<(), Box<dyn Error>> {
1010
use futures::TryStreamExt;

0 commit comments

Comments
 (0)