diff options
Diffstat (limited to 'components/net/fetch')
-rw-r--r-- | components/net/fetch/request.rs | 5 | ||||
-rw-r--r-- | components/net/fetch/response.rs | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs index f4dd62971f8..050ed9b892b 100644 --- a/components/net/fetch/request.rs +++ b/components/net/fetch/request.rs @@ -11,6 +11,7 @@ use fetch::cors_cache::CORSCache; use fetch::response::Response; /// A [request context](http://fetch.spec.whatwg.org/#concept-request-context) +#[deriving(Copy)] pub enum Context { Audio, Beacon, CSPreport, Download, Embed, Eventsource, Favicon, Fetch, Font, Form, Frame, Hyperlink, IFrame, Image, @@ -20,6 +21,7 @@ pub enum Context { } /// A [request context frame type](http://fetch.spec.whatwg.org/#concept-request-context-frame-type) +#[deriving(Copy)] pub enum ContextFrameType { Auxiliary, TopLevel, @@ -35,6 +37,7 @@ pub enum Referer { } /// A [request mode](http://fetch.spec.whatwg.org/#concept-request-mode) +#[deriving(Copy)] pub enum RequestMode { SameOrigin, NoCORS, @@ -43,6 +46,7 @@ pub enum RequestMode { } /// Request [credentials mode](http://fetch.spec.whatwg.org/#concept-request-credentials-mode) +#[deriving(Copy)] pub enum CredentialsMode { Omit, CredentialsSameOrigin, @@ -50,6 +54,7 @@ pub enum CredentialsMode { } /// [Response tainting](http://fetch.spec.whatwg.org/#concept-request-response-tainting) +#[deriving(Copy)] pub enum ResponseTainting { Basic, CORSTainting, diff --git a/components/net/fetch/response.rs b/components/net/fetch/response.rs index f2ee213560d..2c1817de338 100644 --- a/components/net/fetch/response.rs +++ b/components/net/fetch/response.rs @@ -9,7 +9,7 @@ use std::ascii::AsciiExt; use std::comm::Receiver; /// [Response type](http://fetch.spec.whatwg.org/#concept-response-type) -#[deriving(Clone, PartialEq)] +#[deriving(Clone, PartialEq, Copy)] pub enum ResponseType { Basic, CORS, @@ -19,7 +19,7 @@ pub enum ResponseType { } /// [Response termination reason](http://fetch.spec.whatwg.org/#concept-response-termination-reason) -#[deriving(Clone)] +#[deriving(Clone, Copy)] pub enum TerminationReason { EndUserAbort, Fatal, |