Skip to content

Commit 9e06d6b

Browse files
committed
Document impls module
1 parent 725b715 commit 9e06d6b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tokio-postgres/src/impls.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Futures and stream types used in the crate.
12
use bytes::{Bytes, IntoBuf};
23
use futures::{try_ready, Async, Future, Poll, Stream};
34
use std::error;
@@ -8,6 +9,7 @@ use crate::{Client, Connection, Error, Portal, Row, Statement, TlsConnect};
89
#[cfg(feature = "runtime")]
910
use crate::{MakeTlsConnect, Socket};
1011

12+
/// The future returned by `Client::cancel_query_raw`.
1113
#[must_use = "futures do nothing unless polled"]
1214
pub struct CancelQueryRaw<S, T>(pub(crate) proto::CancelQueryRawFuture<S, T>)
1315
where
@@ -27,6 +29,7 @@ where
2729
}
2830
}
2931

32+
/// The future returned by `Client::cancel_query`.
3033
#[cfg(feature = "runtime")]
3134
#[must_use = "futures do nothing unless polled"]
3235
pub struct CancelQuery<T>(pub(crate) proto::CancelQueryFuture<T>)
@@ -46,6 +49,7 @@ where
4649
}
4750
}
4851

52+
/// The future returned by `Config::connect_raw`.
4953
#[must_use = "futures do nothing unless polled"]
5054
pub struct ConnectRaw<S, T>(pub(crate) proto::ConnectRawFuture<S, T>)
5155
where
@@ -67,6 +71,7 @@ where
6771
}
6872
}
6973

74+
/// The future returned by `Config::connect`.
7075
#[cfg(feature = "runtime")]
7176
#[must_use = "futures do nothing unless polled"]
7277
pub struct Connect<T>(pub(crate) proto::ConnectFuture<T>)
@@ -88,6 +93,7 @@ where
8893
}
8994
}
9095

96+
/// The future returned by `Client::prepare`.
9197
#[must_use = "futures do nothing unless polled"]
9298
pub struct Prepare(pub(crate) proto::PrepareFuture);
9399

@@ -102,6 +108,7 @@ impl Future for Prepare {
102108
}
103109
}
104110

111+
/// The future returned by `Client::query`.
105112
#[must_use = "streams do nothing unless polled"]
106113
pub struct Query(pub(crate) proto::QueryStream<proto::Statement>);
107114

@@ -114,6 +121,7 @@ impl Stream for Query {
114121
}
115122
}
116123

124+
/// The future returned by `Client::bind`.
117125
#[must_use = "futures do nothing unless polled"]
118126
pub struct Bind(pub(crate) proto::BindFuture);
119127

@@ -130,6 +138,7 @@ impl Future for Bind {
130138
}
131139
}
132140

141+
/// The future returned by `Client::query_portal`.
133142
#[must_use = "streams do nothing unless polled"]
134143
pub struct QueryPortal(pub(crate) proto::QueryStream<proto::Portal>);
135144

@@ -142,6 +151,7 @@ impl Stream for QueryPortal {
142151
}
143152
}
144153

154+
/// The future returned by `Client::copy_in`.
145155
#[must_use = "futures do nothing unless polled"]
146156
pub struct CopyIn<S>(pub(crate) proto::CopyInFuture<S>)
147157
where
@@ -165,6 +175,7 @@ where
165175
}
166176
}
167177

178+
/// The future returned by `Client::copy_out`.
168179
#[must_use = "streams do nothing unless polled"]
169180
pub struct CopyOut(pub(crate) proto::CopyOutStream);
170181

0 commit comments

Comments
 (0)