@@ -53,22 +53,26 @@ use std::{error::Error, fmt, pin::Pin, task::Context, task::Poll};
53
53
///
54
54
/// The upgrade process is defined by the following stages:
55
55
///
56
- /// [`authenticate`](Builder:: authenticate)`{1}`
57
- /// -> [`apply`](Builder:: apply)`{*}`
58
- /// -> [`multiplex`](Builder:: multiplex)`{1}`
56
+ /// [`authenticate`](struct. Builder.html#method. authenticate)`{1}`
57
+ /// -> [`apply`](struct. Builder.html#method. apply)`{*}`
58
+ /// -> [`multiplex`](struct. Builder.html#method. multiplex)`{1}`
59
59
///
60
60
/// It thus enforces the following invariants on every transport
61
- /// obtained from [`multiplex`](Builder:: multiplex):
61
+ /// obtained from [`multiplex`](struct. Builder.html#method. multiplex)
62
62
///
63
- /// 1. The transport must be [authenticated](Builder:: authenticate)
64
- /// and [multiplexed](Builder:: multiplex).
63
+ /// 1. The transport must be [authenticated](struct. Builder.html#method. authenticate)
64
+ /// and [multiplexed](struct. Builder.html#method. multiplex).
65
65
/// 2. Authentication must precede the negotiation of a multiplexer.
66
66
/// 3. Applying a multiplexer is the last step in the upgrade process.
67
67
/// 4. The [`Transport::Output`] conforms to the requirements of a [`Network`],
68
68
/// namely a tuple of a [`ConnectionInfo`] (from the authentication upgrade) and a
69
69
/// [`StreamMuxer`] (from the multiplexing upgrade).
70
70
///
71
- /// [`Network`]: crate::nodes::Network
71
+ /// [`ConnectionInfo`]: <../../nodes/collection/trait.ConnectionInfo.html>
72
+ /// [`Network`]: <../../nodes/network/struct.Network.html>
73
+ /// [`Transport`]: <../../transport/trait.Transport.html>
74
+ /// [`Transport::Output`]: <../../transport/trait.Transport.html#associatedType.Output>
75
+ /// [`StreamMuxer`]: <../../muxing/trait.StreamMuxing.html>
72
76
pub struct Builder < T > {
73
77
inner : T ,
74
78
version : upgrade:: Version ,
97
101
///
98
102
/// * I/O upgrade: `C -> (I, D)`.
99
103
/// * Transport output: `C -> (I, D)`
104
+ ///
105
+ /// [`ConnectionInfo`]: <../../nodes/collection/trait.ConnectionInfo.html>
100
106
pub fn authenticate < C , D , U , I , E > ( self , upgrade : U ) -> Builder <
101
107
AndThen < T , impl FnOnce ( C , ConnectedPoint ) -> Authenticate < C , U > + Clone >
102
108
> where
@@ -151,6 +157,8 @@ where
151
157
///
152
158
/// * I/O upgrade: `C -> M`.
153
159
/// * Transport output: `(I, C) -> (I, M)`.
160
+ ///
161
+ /// [`StreamMuxer`]: <../../muxing/trait.StreamMuxing.html>
154
162
pub fn multiplex < C , M , U , I , E > ( self , upgrade : U )
155
163
-> AndThen < T , impl FnOnce ( ( I , C ) , ConnectedPoint ) -> Multiplex < C , U , I > + Clone >
156
164
where
@@ -174,6 +182,8 @@ where
174
182
/// in the context of negotiating a secure channel.
175
183
///
176
184
/// Configured through [`Builder::authenticate`].
185
+ ///
186
+ /// [`Builder::authenticate`]: <../struct.Builder.html#method.authenticate>
177
187
#[ pin_project:: pin_project]
178
188
pub struct Authenticate < C , U >
179
189
where
@@ -204,6 +214,8 @@ where
204
214
/// top of an authenticated transport.
205
215
///
206
216
/// Configured through [`Builder::multiplex`].
217
+ ///
218
+ /// [`Builder::multiplex`]: <../struct.Builder.html#method.multiplex>
207
219
#[ pin_project:: pin_project]
208
220
pub struct Multiplex < C , U , I >
209
221
where
@@ -239,7 +251,10 @@ type EitherUpgrade<C, U> = future::Either<InboundUpgradeApply<C, U>, OutboundUpg
239
251
240
252
/// An upgrade on an authenticated, non-multiplexed [`Transport`].
241
253
///
242
- /// See [`Builder::upgrade`](Builder::upgrade).
254
+ /// See [`Builder`](../struct.Builder.html)
255
+ ///
256
+ /// [`Transport`]: <../../transport/trait.Transport.html>
257
+ ///
243
258
#[ derive( Debug , Copy , Clone ) ]
244
259
pub struct Upgrade < T , U > { inner : T , upgrade : U }
245
260
@@ -319,6 +334,9 @@ where
319
334
}
320
335
321
336
/// The [`Transport::Dial`] future of an [`Upgrade`]d transport.
337
+ ///
338
+ /// [`Transport::Dial`]: <../../transport/trait.Transport.html#associatedType.Dial>
339
+ /// [`Upgrade`]: <../struct.Upgrade.html>
322
340
pub struct DialUpgradeFuture < F , U , I , C >
323
341
where
324
342
U : OutboundUpgrade < Negotiated < C > > ,
@@ -373,6 +391,9 @@ where
373
391
}
374
392
375
393
/// The [`Transport::Listener`] stream of an [`Upgrade`]d transport.
394
+ ///
395
+ /// [`Transport::Listener`]: <../../transport/trait.Transport.html#associatedType.Listener>
396
+ /// [`Upgrade`]: <../struct.Upgrade.html>
376
397
pub struct ListenerStream < S , U > {
377
398
stream : Pin < Box < S > > ,
378
399
upgrade : U
@@ -410,6 +431,9 @@ impl<S, U> Unpin for ListenerStream<S, U> {
410
431
}
411
432
412
433
/// The [`Transport::ListenerUpgrade`] future of an [`Upgrade`]d transport.
434
+ ///
435
+ /// [`Transport::ListenerUpgrade`]: <../../transport/trait.Transport.html#associatedType.ListenerUpgrade>
436
+ /// [`Upgrade`]: <../struct.Upgrade.html>
413
437
pub struct ListenerUpgradeFuture < F , U , I , C >
414
438
where
415
439
C : AsyncRead + AsyncWrite + Unpin ,
0 commit comments