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
				
			| @@ -6,11 +6,12 @@ use intertwine::{Intertwine, Intertwined}; | ||||
| use macceptor::MoveAcceptor; | ||||
|  | ||||
| pub use self::request::Request; | ||||
| pub use self::response::{Response, Fresh, Streaming}; | ||||
|  | ||||
| use net::{NetworkListener, NetworkAcceptor, NetworkStream, HttpAcceptor, HttpListener, HttpStream}; | ||||
| pub use self::response::Response; | ||||
|  | ||||
| use {HttpResult}; | ||||
| use net::{NetworkListener, NetworkAcceptor, NetworkStream, | ||||
|           HttpAcceptor, HttpListener, HttpStream, | ||||
|           Fresh}; | ||||
|  | ||||
| pub mod request; | ||||
| pub mod response; | ||||
|   | ||||
| @@ -10,21 +10,9 @@ use header; | ||||
| use header::common; | ||||
| use http::{CR, LF, LINE_ENDING}; | ||||
| use status; | ||||
| use net::NetworkStream; | ||||
| use net::{NetworkStream, WriteStatus, Fresh, Streaming}; | ||||
| use version; | ||||
|  | ||||
| /// Phantom type indicating Headers and StatusCode have not been written. | ||||
| pub struct Fresh; | ||||
|  | ||||
| /// Phantom type indicating Headers and StatusCode have been written. | ||||
| pub struct Streaming; | ||||
|  | ||||
| /// The status of a Response, indicating if the headers and status have been written. | ||||
| pub trait WriteStatus {} | ||||
|  | ||||
| impl WriteStatus for Streaming {} | ||||
| impl WriteStatus for Fresh {} | ||||
|  | ||||
| /// The outgoing half for a Tcp connection, created by a `Server` and given to a `Handler`. | ||||
| pub struct Response<W: WriteStatus> { | ||||
|     /// The HTTP version of this response. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user