Now using use along with enums, as per https://github.com/rust-lang/rust/pull/18973.
This commit is contained in:
committed by
Jakob Gillich
parent
7e55506134
commit
d7e8b8b117
@@ -3,6 +3,8 @@ use std::fmt::{mod, Show};
|
||||
use std::str::FromStr;
|
||||
use super::util::{from_comma_delimited, fmt_comma_delimited};
|
||||
|
||||
use self::ConnectionOption::{KeepAlive, Close, ConnectionHeader};
|
||||
|
||||
/// The `Connection` header.
|
||||
#[deriving(Clone, PartialEq, Show)]
|
||||
pub struct Connection(pub Vec<ConnectionOption>);
|
||||
|
||||
@@ -3,6 +3,8 @@ use std::fmt;
|
||||
use std::str::FromStr;
|
||||
use super::util::{from_comma_delimited, fmt_comma_delimited};
|
||||
|
||||
use self::Encoding::{Chunked, Gzip, Deflate, Compress, EncodingExt};
|
||||
|
||||
/// The `Transfer-Encoding` header.
|
||||
///
|
||||
/// This header describes the encoding of the message body. It can be
|
||||
@@ -32,7 +34,6 @@ pub struct TransferEncoding(pub Vec<Encoding>);
|
||||
pub enum Encoding {
|
||||
/// The `chunked` encoding.
|
||||
Chunked,
|
||||
|
||||
/// The `gzip` encoding.
|
||||
Gzip,
|
||||
/// The `deflate` encoding.
|
||||
|
||||
@@ -3,6 +3,8 @@ use std::fmt::{mod, Show};
|
||||
use std::str::FromStr;
|
||||
use super::util::{from_comma_delimited, fmt_comma_delimited};
|
||||
|
||||
use self::Protocol::{WebSocket, ProtocolExt};
|
||||
|
||||
/// The `Upgrade` header.
|
||||
#[deriving(Clone, PartialEq, Show)]
|
||||
pub struct Upgrade(Vec<Protocol>);
|
||||
|
||||
Reference in New Issue
Block a user