File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Can't attach docs to enum variants in the macro
2+ #[ allow( missing_doc) ] ;
3+
14macro_rules! make_errors(
25 ( $( $code: pat => $error: ident) ,+) => (
36 // TODO: Get rid of this module when mozilla/rust#4375 is fixed
Original file line number Diff line number Diff line change @@ -141,12 +141,26 @@ impl PostgresNoticeHandler for DefaultNoticeHandler {
141141/// Reasons a new Postgres connection could fail
142142#[ deriving( ToStr ) ]
143143pub enum PostgresConnectError {
144+ /// The provided URL could not be parsed
144145 InvalidUrl ,
146+
147+ /// The URL was missing a user
145148 MissingUser ,
149+
150+ /// DNS lookup failed
146151 DnsError ,
152+
153+ /// There was an error opening a socket to the server
147154 SocketError ,
155+
156+ /// An error from the Postgres server itself
148157 DbError ( PostgresDbError ) ,
158+
159+ /// A password was required but not provided in the URL
149160 MissingPassword ,
161+
162+ /// The Postgres server requested an authentication method not supported
163+ /// by the driver
150164 UnsupportedAuthentication
151165}
152166
@@ -157,7 +171,9 @@ pub enum PostgresErrorPosition {
157171 Position ( uint ) ,
158172 /// A position in an internally generated query
159173 InternalPosition {
174+ /// The byte position
160175 position : uint ,
176+ /// A query generated by the Postgres server
161177 query : ~str
162178 }
163179}
Original file line number Diff line number Diff line change @@ -106,7 +106,9 @@ impl PostgresType {
106106
107107/// The wire format of a Postgres value
108108pub enum Format {
109+ /// A user-readable string format
109110 Text = 0 ,
111+ /// A machine-readable binary format
110112 Binary = 1
111113}
112114
You can’t perform that action at this time.
0 commit comments