File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,16 @@ impl Port {
110
110
}
111
111
112
112
/// 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
113
115
pub fn stream ( & mut self ) -> Option < impl AsyncRead + AsyncWrite + Unpin > {
114
116
self . stream . take ( )
115
117
}
116
118
117
119
/// 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.
119
123
pub fn error ( & mut self ) -> Option < impl Future < Output = Option < String > > > {
120
124
// Ignore Cancellation error.
121
125
self . error . take ( ) . map ( |recv| recv. map ( |res| res. ok ( ) ) )
You can’t perform that action at this time.
0 commit comments