Moved WriteStatus, Fresh, and Streaming in to the net module.

This commit is contained in:
Jonathan Reem
2014-09-10 15:20:14 -07:00
committed by Sean McArthur
parent d5c6f33c34
commit 4115c0e219
5 changed files with 26 additions and 37 deletions

View File

@@ -6,28 +6,11 @@ use url::Url;
use method::{mod, Get, Post, Delete, Put, Patch, Head, Options};
use header::Headers;
use header::common::Host;
use net::{NetworkStream, HttpStream};
use net::{NetworkStream, HttpStream, WriteStatus, Fresh, Streaming};
use http::LINE_ENDING;
use version;
use {HttpResult, HttpUriError};
use super::Response;
/// The write-status of a Request that has not had its headers written.
pub struct Fresh;
/// The write-status of a Request that has had its headers 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 {}
use client::Response;
/// A client request to a remote server.
pub struct Request<W: WriteStatus> {