Moved WriteStatus, Fresh, and Streaming in to the net module.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							d5c6f33c34
						
					
				
				
					commit
					4115c0e219
				
			
							
								
								
									
										17
									
								
								src/net.rs
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								src/net.rs
									
									
									
									
									
								
							| @@ -3,6 +3,23 @@ use std::io::{IoResult, Stream, Listener, Acceptor}; | ||||
| use std::io::net::ip::{SocketAddr, Port}; | ||||
| use std::io::net::tcp::{TcpStream, TcpListener, TcpAcceptor}; | ||||
|  | ||||
| /// The write-status indicating headers have not been written. | ||||
| pub struct Fresh; | ||||
|  | ||||
| /// The write-status indicating headers have been written. | ||||
| pub struct Streaming; | ||||
|  | ||||
| /// The write-status of a Request | ||||
| pub trait WriteStatus: Private {} | ||||
| impl WriteStatus for Fresh {} | ||||
| impl WriteStatus for Streaming {} | ||||
|  | ||||
| // Only Fresh and Streaming can be WriteStatus | ||||
| #[doc(hidden)] | ||||
| trait Private {} | ||||
| impl Private for Fresh {} | ||||
| impl Private for Streaming {} | ||||
|  | ||||
| /// An abstraction to listen for connections on a certain port. | ||||
| pub trait NetworkListener<S: NetworkStream, A: NetworkAcceptor<S>>: Listener<S, A> { | ||||
|     /// Bind to a socket. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user