Skip to content

Commit 1c697d5

Browse files
kazkclux
andcommitted
Improve docs
Co-authored-by: Eirik A <[email protected]> Signed-off-by: kazk <[email protected]>
1 parent 798a4aa commit 1c697d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kube-client/src/api/portforward.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,16 @@ impl Port {
110110
}
111111

112112
/// Data pipe for sending to and receiving from the forwarded port.
113+
///
114+
/// This returns a `Some` on the first call, then a `None` on every subsequent call
113115
pub fn stream(&mut self) -> Option<impl AsyncRead + AsyncWrite + Unpin> {
114116
self.stream.take()
115117
}
116118

117119
/// Future that resolves with any error message or when the error sender is dropped.
118-
/// When this resolves, the port should be considered no longer usable.
120+
///
121+
/// This returns a `Some` on the first call, then a `None` on every subsequent call
122+
/// When the future resolves, the port should be considered no longer usable.
119123
pub fn error(&mut self) -> Option<impl Future<Output = Option<String>>> {
120124
// Ignore Cancellation error.
121125
self.error.take().map(|recv| recv.map(|res| res.ok()))

0 commit comments

Comments
 (0)