@@ -173,7 +173,7 @@ pub struct UserInfo {
173173
174174/// Information necessary to open a new connection to a Postgres server.
175175#[ deriving( Clone ) ]
176- pub struct PostgresConnectParams {
176+ pub struct ConnectParams {
177177 /// The target server
178178 pub target : ConnectTarget ,
179179 /// The target port.
@@ -192,20 +192,20 @@ pub struct PostgresConnectParams {
192192}
193193
194194/// A trait implemented by types that can be converted into a
195- /// `PostgresConnectParams `.
195+ /// `ConnectParams `.
196196pub trait IntoConnectParams {
197- /// Converts the value of `self` into a `PostgresConnectParams `.
198- fn into_connect_params ( self ) -> result:: Result < PostgresConnectParams , PostgresConnectError > ;
197+ /// Converts the value of `self` into a `ConnectParams `.
198+ fn into_connect_params ( self ) -> result:: Result < ConnectParams , PostgresConnectError > ;
199199}
200200
201- impl IntoConnectParams for PostgresConnectParams {
202- fn into_connect_params ( self ) -> result:: Result < PostgresConnectParams , PostgresConnectError > {
201+ impl IntoConnectParams for ConnectParams {
202+ fn into_connect_params ( self ) -> result:: Result < ConnectParams , PostgresConnectError > {
203203 Ok ( self )
204204 }
205205}
206206
207207impl < ' a > IntoConnectParams for & ' a str {
208- fn into_connect_params ( self ) -> result:: Result < PostgresConnectParams , PostgresConnectError > {
208+ fn into_connect_params ( self ) -> result:: Result < ConnectParams , PostgresConnectError > {
209209 match Url :: parse ( self ) {
210210 Ok ( url) => url. into_connect_params ( ) ,
211211 Err ( err) => return Err ( InvalidUrl ( err) ) ,
@@ -214,7 +214,7 @@ impl<'a> IntoConnectParams for &'a str {
214214}
215215
216216impl IntoConnectParams for Url {
217- fn into_connect_params ( self ) -> result:: Result < PostgresConnectParams , PostgresConnectError > {
217+ fn into_connect_params ( self ) -> result:: Result < ConnectParams , PostgresConnectError > {
218218 let Url {
219219 host,
220220 port,
@@ -243,7 +243,7 @@ impl IntoConnectParams for Url {
243243 None
244244 } ;
245245
246- Ok ( PostgresConnectParams {
246+ Ok ( ConnectParams {
247247 target : target,
248248 port : port,
249249 user : user,
@@ -374,7 +374,7 @@ impl InnerPostgresConnection {
374374 let params = try!( params. into_connect_params ( ) ) ;
375375 let stream = try!( io:: initialize_stream ( & params, ssl) ) ;
376376
377- let PostgresConnectParams {
377+ let ConnectParams {
378378 user,
379379 database,
380380 mut options,
@@ -723,7 +723,7 @@ impl PostgresConnection {
723723 /// To connect to the server via Unix sockets, `host` should be set to the
724724 /// absolute path of the directory containing the socket file. Since `/` is
725725 /// a reserved character in URLs, the path should be URL encoded. If the
726- /// path contains non-UTF 8 characters, a `PostgresConnectParams ` struct
726+ /// path contains non-UTF 8 characters, a `ConnectParams ` struct
727727 /// should be created manually and passed in. Note that Postgres does not
728728 /// support SSL over Unix sockets.
729729 ///
@@ -746,10 +746,10 @@ impl PostgresConnection {
746746 /// ```
747747 ///
748748 /// ```rust,no_run
749- /// # use postgres::{PostgresConnection, UserInfo, PostgresConnectParams , NoSsl, TargetUnix};
749+ /// # use postgres::{PostgresConnection, UserInfo, ConnectParams , NoSsl, TargetUnix};
750750 /// # let _ = || {
751751 /// # let some_crazy_path = Path::new("");
752- /// let params = PostgresConnectParams {
752+ /// let params = ConnectParams {
753753 /// target: TargetUnix(some_crazy_path),
754754 /// port: None,
755755 /// user: Some(UserInfo {
0 commit comments