@@ -36,7 +36,7 @@ pub trait NetworkListener: Clone {
3636 }
3737}
3838
39- /// An iterator wrapper over a NetworkAcceptor.
39+ /// An iterator wrapper over a ` NetworkAcceptor` .
4040pub struct NetworkConnections < ' a , N : NetworkListener + ' a > ( & ' a mut N ) ;
4141
4242impl < ' a , N : NetworkListener + ' a > Iterator for NetworkConnections < ' a , N > {
@@ -46,7 +46,7 @@ impl<'a, N: NetworkListener + 'a> Iterator for NetworkConnections<'a, N> {
4646 }
4747}
4848
49- /// An abstraction over streams that a Server can utilize.
49+ /// An abstraction over streams that a ` Server` can utilize.
5050pub trait NetworkStream : Read + Write + Any + Send + Typeable {
5151 /// Get the remote address of the underlying connection.
5252 fn peer_addr ( & mut self ) -> io:: Result < SocketAddr > ;
@@ -76,7 +76,7 @@ pub trait NetworkStream: Read + Write + Any + Send + Typeable {
7676
7777/// A connector creates a NetworkStream.
7878pub trait NetworkConnector {
79- /// Type of Stream to create
79+ /// Type of ` Stream` to create
8080 type Stream : Into < Box < NetworkStream + Send > > ;
8181
8282 /// Connect to a remote address.
@@ -111,13 +111,13 @@ impl NetworkStream {
111111}
112112
113113impl NetworkStream {
114- /// Is the underlying type in this trait object a T ?
114+ /// Is the underlying type in this trait object a `T` ?
115115 #[ inline]
116116 pub fn is < T : Any > ( & self ) -> bool {
117117 ( * self ) . get_type ( ) == TypeId :: of :: < T > ( )
118118 }
119119
120- /// If the underlying type is T , get a reference to the contained data.
120+ /// If the underlying type is `T` , get a reference to the contained data.
121121 #[ inline]
122122 pub fn downcast_ref < T : Any > ( & self ) -> Option < & T > {
123123 if self . is :: < T > ( ) {
@@ -127,7 +127,7 @@ impl NetworkStream {
127127 }
128128 }
129129
130- /// If the underlying type is T , get a mutable reference to the contained
130+ /// If the underlying type is `T` , get a mutable reference to the contained
131131 /// data.
132132 #[ inline]
133133 pub fn downcast_mut < T : Any > ( & mut self ) -> Option < & mut T > {
@@ -138,7 +138,7 @@ impl NetworkStream {
138138 }
139139 }
140140
141- /// If the underlying type is T , extract it.
141+ /// If the underlying type is `T` , extract it.
142142 #[ inline]
143143 pub fn downcast < T : Any > ( self : Box < NetworkStream > )
144144 -> Result < Box < T > , Box < NetworkStream > > {
@@ -166,13 +166,13 @@ impl NetworkStream + Send {
166166}
167167
168168impl NetworkStream + Send {
169- /// Is the underlying type in this trait object a T ?
169+ /// Is the underlying type in this trait object a `T` ?
170170 #[ inline]
171171 pub fn is < T : Any > ( & self ) -> bool {
172172 ( * self ) . get_type ( ) == TypeId :: of :: < T > ( )
173173 }
174174
175- /// If the underlying type is T , get a reference to the contained data.
175+ /// If the underlying type is `T` , get a reference to the contained data.
176176 #[ inline]
177177 pub fn downcast_ref < T : Any > ( & self ) -> Option < & T > {
178178 if self . is :: < T > ( ) {
@@ -182,7 +182,7 @@ impl NetworkStream + Send {
182182 }
183183 }
184184
185- /// If the underlying type is T , get a mutable reference to the contained
185+ /// If the underlying type is `T` , get a mutable reference to the contained
186186 /// data.
187187 #[ inline]
188188 pub fn downcast_mut < T : Any > ( & mut self ) -> Option < & mut T > {
@@ -193,7 +193,7 @@ impl NetworkStream + Send {
193193 }
194194 }
195195
196- /// If the underlying type is T , extract it.
196+ /// If the underlying type is `T` , extract it.
197197 #[ inline]
198198 pub fn downcast < T : Any > ( self : Box < NetworkStream + Send > )
199199 -> Result < Box < T > , Box < NetworkStream + Send > > {
@@ -270,7 +270,7 @@ impl ::std::os::unix::io::FromRawFd for HttpListener {
270270 }
271271}
272272
273- /// A wrapper around a TcpStream.
273+ /// A wrapper around a ` TcpStream` .
274274pub struct HttpStream ( pub TcpStream ) ;
275275
276276impl Clone for HttpStream {
@@ -381,7 +381,7 @@ impl NetworkConnector for HttpConnector {
381381 }
382382}
383383
384- /// A closure as a connector used to generate TcpStreams per request
384+ /// A closure as a connector used to generate `TcpStream`s per request
385385///
386386/// # Example
387387///
@@ -393,7 +393,7 @@ impl NetworkConnector for HttpConnector {
393393/// });
394394/// ```
395395///
396- /// Example using TcpBuilder from the net2 crate if you want to configure your source socket:
396+ /// Example using ` TcpBuilder` from the net2 crate if you want to configure your source socket:
397397///
398398/// ```norun
399399/// Client::with_connector(|addr: &str, port: u16, scheme: &str| {
0 commit comments