Skip to content

Commit 70028c4

Browse files
committed
Add some more documentation after lint fixes
1 parent 5a4ef27 commit 70028c4

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/postgres/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Can't attach docs to enum variants in the macro
2+
#[allow(missing_doc)];
3+
14
macro_rules! make_errors(
25
($($code:pat => $error:ident),+) => (
36
// TODO: Get rid of this module when mozilla/rust#4375 is fixed

src/postgres/lib.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,26 @@ impl PostgresNoticeHandler for DefaultNoticeHandler {
141141
/// Reasons a new Postgres connection could fail
142142
#[deriving(ToStr)]
143143
pub 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
}

src/postgres/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ impl PostgresType {
106106

107107
/// The wire format of a Postgres value
108108
pub enum Format {
109+
/// A user-readable string format
109110
Text = 0,
111+
/// A machine-readable binary format
110112
Binary = 1
111113
}
112114

0 commit comments

Comments
 (0)