Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 051d5b8

Browse files
committed
added example to README
1 parent 514ac75 commit 051d5b8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ version = "0.1.0"
55
authors = ["jbg <jbg@dtmf.io>"]
66
edition = "2018"
77
license = "MIT"
8+
readme = "README.md"
89

910
[dependencies]
1011
futures = "0.1.28"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ and the [tokio-postgres asynchronous PostgreSQL client library](https://github.c
66

77
[API Documentation](https://docs.rs/tokio-postgres-rustls/)
88

9+
# Example
10+
11+
```
12+
let config = rustls::ClientConfig::new();
13+
let tls = tokio_postgres::rustls::MakeRustlsConnect::new(config);
14+
let connect_fut = tokio_postgres::connect("host=localhost user=postgres", tls);
15+
// ...
16+
```
17+
918
# License
1019
tokio-postgres-rustls is distributed under the MIT license.
1120

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy