@@ -165,9 +165,9 @@ impl Capabilities {
165165 }
166166}
167167
168- #[ cfg( feature = "blocking-client" ) ]
169168///
170- pub mod recv {
169+ #[ cfg( feature = "blocking-client" ) ]
170+ pub mod blocking_recv {
171171 use std:: io;
172172
173173 use bstr:: ByteVec ;
@@ -178,8 +178,8 @@ pub mod recv {
178178 Protocol ,
179179 } ;
180180
181- /// Success outcome of [`Capabilities::from_lines_with_version_detection`] .
182- pub struct Outcome < ' a > {
181+ /// The information provided by the server upon first connection .
182+ pub struct Handshake < ' a > {
183183 /// The [`Capabilities`] the remote advertised.
184184 pub capabilities : Capabilities ,
185185 /// The remote refs as a [`io::BufRead`].
@@ -191,14 +191,14 @@ pub mod recv {
191191 pub protocol : Protocol ,
192192 }
193193
194- impl Capabilities {
194+ impl Handshake < ' _ > {
195195 /// Read the capabilities and version advertisement from the given packetline reader.
196196 ///
197197 /// If [`Protocol::V1`] was requested, or the remote decided to downgrade, the remote refs
198- /// advertisement will also be included in the [`Outcome `].
198+ /// advertisement will also be included in the [`Handshake `].
199199 pub fn from_lines_with_version_detection < T : io:: Read > (
200200 rd : & mut StreamingPeekableIter < T > ,
201- ) -> Result < Outcome < ' _ > , client:: Error > {
201+ ) -> Result < Handshake < ' _ > , client:: Error > {
202202 // NOTE that this is vitally important - it is turned on and stays on for all following requests so
203203 // we automatically abort if the server sends an ERR line anywhere.
204204 // We are sure this can't clash with binary data when sent due to the way the PACK
@@ -214,13 +214,13 @@ pub mod recv {
214214 Protocol :: V1 => {
215215 let ( capabilities, delimiter_position) = Capabilities :: from_bytes ( line. 0 ) ?;
216216 rd. peek_buffer_replace_and_truncate ( delimiter_position, b'\n' ) ;
217- Outcome {
217+ Handshake {
218218 capabilities,
219219 refs : Some ( Box :: new ( rd. as_read ( ) ) ) ,
220220 protocol : Protocol :: V1 ,
221221 }
222222 }
223- Protocol :: V2 => Outcome {
223+ Protocol :: V2 => Handshake {
224224 capabilities : {
225225 let mut rd = rd. as_read ( ) ;
226226 let mut buf = Vec :: new ( ) ;
@@ -243,7 +243,7 @@ pub mod recv {
243243 } ,
244244 }
245245 }
246- None => Outcome {
246+ None => Handshake {
247247 capabilities : Capabilities :: default ( ) ,
248248 refs : Some ( Box :: new ( rd. as_read ( ) ) ) ,
249249 protocol : Protocol :: V0 ,
@@ -253,10 +253,10 @@ pub mod recv {
253253 }
254254}
255255
256- #[ cfg( all( feature = "async-client" , not( feature = "blocking-client" ) ) ) ]
257- #[ allow( missing_docs) ]
258256///
259- pub mod recv {
257+ #[ cfg( feature = "async-client" ) ]
258+ #[ allow( missing_docs) ]
259+ pub mod async_recv {
260260 use bstr:: ByteVec ;
261261 use futures_io:: AsyncRead ;
262262
@@ -266,8 +266,8 @@ pub mod recv {
266266 Protocol ,
267267 } ;
268268
269- /// Success outcome of [`Capabilities::from_lines_with_version_detection`] .
270- pub struct Outcome < ' a > {
269+ /// The information provided by the server upon first connection .
270+ pub struct Handshake < ' a > {
271271 /// The [`Capabilities`] the remote advertised.
272272 pub capabilities : Capabilities ,
273273 /// The remote refs as an [`AsyncBufRead`].
@@ -279,14 +279,14 @@ pub mod recv {
279279 pub protocol : Protocol ,
280280 }
281281
282- impl Capabilities {
282+ impl Handshake < ' _ > {
283283 /// Read the capabilities and version advertisement from the given packetline reader.
284284 ///
285285 /// If [`Protocol::V1`] was requested, or the remote decided to downgrade, the remote refs
286- /// advertisement will also be included in the [`Outcome `].
286+ /// advertisement will also be included in the [`Handshake `].
287287 pub async fn from_lines_with_version_detection < T : AsyncRead + Unpin > (
288288 rd : & mut StreamingPeekableIter < T > ,
289- ) -> Result < Outcome < ' _ > , client:: Error > {
289+ ) -> Result < Handshake < ' _ > , client:: Error > {
290290 // NOTE that this is vitally important - it is turned on and stays on for all following requests so
291291 // we automatically abort if the server sends an ERR line anywhere.
292292 // We are sure this can't clash with binary data when sent due to the way the PACK
@@ -302,13 +302,13 @@ pub mod recv {
302302 Protocol :: V1 => {
303303 let ( capabilities, delimiter_position) = Capabilities :: from_bytes ( line. 0 ) ?;
304304 rd. peek_buffer_replace_and_truncate ( delimiter_position, b'\n' ) ;
305- Outcome {
305+ Handshake {
306306 capabilities,
307307 refs : Some ( Box :: new ( rd. as_read ( ) ) ) ,
308308 protocol : Protocol :: V1 ,
309309 }
310310 }
311- Protocol :: V2 => Outcome {
311+ Protocol :: V2 => Handshake {
312312 capabilities : {
313313 let mut rd = rd. as_read ( ) ;
314314 let mut buf = Vec :: new ( ) ;
@@ -331,7 +331,7 @@ pub mod recv {
331331 } ,
332332 }
333333 }
334- None => Outcome {
334+ None => Handshake {
335335 capabilities : Capabilities :: default ( ) ,
336336 refs : Some ( Box :: new ( rd. as_read ( ) ) ) ,
337337 protocol : Protocol :: V0 ,
0 commit comments