From 7322308a161e0bf9ab242272248802747a5a3562 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Thu, 15 Sep 2016 10:27:21 -0700 Subject: [PATCH] Don't talk about TlsMode until we actually cut 0.12 Causes a bunch of confusion. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c69228a8..36588058 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Rust-Postgres is a pure-Rust frontend for the popular PostgreSQL database. ```rust extern crate postgres; -use postgres::{Connection, TlsMode}; +use postgres::{Connection, SslMode}; struct Person { id: i32, @@ -26,7 +26,7 @@ struct Person { } fn main() { - let conn = Connection::connect("postgres://postgres@localhost", TlsMode::None).unwrap(); + let conn = Connection::connect("postgres://postgres@localhost", SslMode::None).unwrap(); conn.execute("CREATE TABLE person ( id SERIAL PRIMARY KEY, name VARCHAR NOT NULL, @@ -65,7 +65,7 @@ fn main() { Connect to a Postgres server using the standard URI format: ```rust let conn = try!(Connection::connect("postgres://user:pass@host:port/database?arg1=val1&arg2=val2", - TlsMode::None)); + SslMode::None)); ``` `pass` may be omitted if not needed. `port` defaults to `5432` and `database` defaults to the value of `user` if not specified. The driver supports `trust`, @@ -76,7 +76,7 @@ be set to the absolute path to the directory containing the socket file. Since `/` is a reserved character in URLs, the path should be URL encoded. If Postgres stored its socket files in `/run/postgres`, the connection would then look like: ```rust -let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", TlsMode::None)); +let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", SslMode::None)); ``` Paths which contain non-UTF8 characters can be handled in a different manner; see the documentation for details.