Sean McArthur
9c80fdbb9e
refactor(lib): rename http_types to http
2017-09-29 18:12:55 -07:00
Sam Rijs
0c7d375ba3
feat(lib): implement compatibility with http crate
2017-09-22 12:07:57 -07:00
Sean McArthur
5f6f252c60
feat(status): add as_u16() method
...
A `From<StatusCode> for u16` has existed, but the docs cannot show it.
It also is slightly more annoying to use if type inference can't figure
the types out. This includes an explicit method to get a `u16`.
2017-07-27 13:35:23 -07:00
Sean McArthur
579d360f51
chore(status): remove dead code
2017-06-22 21:10:10 -07:00
Sean McArthur
f953cafe27
feat(status): add StatusCode::try_from(u16).
...
This is a temporary function until the `TryFrom` trait stabilizes.
BREAKING CHANGE: Removes the undocumented `from_u16` function. Use
`StatusCode::try_from` instead.
Also makes the `status` module private. All imports of
`hyper::status::StatusCode` should be `hyper::StatusCode`.
2017-06-13 09:50:46 -07:00
Corey Farwell
1059eb349a
style(lib): address clippy code style warnings
...
* Remove unnecessary return statements.
* Combine identical `match` arms.
* Collapse nested conditional.
* Use `assert_ne` where applicable.
* Lifetime elision.
2017-06-12 20:16:20 -07:00
Sean McArthur
5d19ef88b4
test(status): fixes tests from removing
2017-06-12 17:04:55 -07:00
Sean McArthur
94ee6204ae
feat(status): remove deprecated StatusClass
...
BREAKING CHANGE: All usage of `status.class()` should change to
equivalent `status.is_*()` methods.
2017-06-12 16:27:25 -07:00
Sean McArthur
c18d47db2f
refactor(status): add allow(deprecated) to StatusClass enum for older rust versions
2017-05-11 14:25:35 -07:00
Sean McArthur
638582fae2
refactor(status): deprecate StatusClass
2017-05-11 12:46:46 -07:00
Sean McArthur
d63b7de44f
feat(client): Response.status() now returns a StatusCode
...
Previously, it would return `&StatusCode`. Returning a reference was
actually bigger than the enum itself, and prevented using `Into` on the
return result directly.
BREAKING CHANGE: If you were explicitly checking the status, such as
with an equality comparison, you will need to use the value instead of a
reference.
2017-03-31 15:13:55 -07:00
Sean McArthur
c42f18db05
feat(status): impl Into<u16> for StatusCode
2017-02-02 17:02:35 -08:00
Sean McArthur
d35992d019
feat(lib): switch to non-blocking (asynchronous) IO
...
BREAKING CHANGE: This breaks a lot of the Client and Server APIs.
Check the documentation for how Handlers can be used for asynchronous
events.
2016-05-16 09:51:18 -07:00
Jonathan Giddy
93fd5a87bd
feat(status): add HTTP statuses 421 and 451
...
The official IANA list at
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
has two new status codes that are missing from the hyper status list.
2016-03-14 10:31:54 +00:00
Håvar Nøvik
d84f291abc
feat(status): implement Hash for StatusCode
...
Change hash implementation to just use `derive(Hash)`
2015-07-22 10:50:26 +02:00
Håvar Nøvik
aa85f609b5
feat(status): implement Hash for StatusCode
...
Implment the `Hash` trait for the `StatusCode` enum.
2015-07-21 21:10:47 +02:00
Pyfisch
db93ca0697
style(rustfmt): run rustfmt on hyper correct overlong lines
2015-06-29 20:22:22 +02:00
Marius Seritan
795ee9f5e0
test(status): increasing test coverage of status module
2015-05-24 08:51:07 -07:00
Tshepang Lekhonkhobe
7ddea2791c
docs(misc): fix typos caught by codespell
2015-05-06 02:34:07 +02:00
Sean McArthur
0fb92ee735
feat(debug): add Debug impls for StatusClass, Server, and Listening
2015-04-16 10:04:51 -07:00
Sean McArthur
5c2de29a81
chore(stability): remove core feature gate
2015-04-02 17:32:04 -07:00
Sean McArthur
ccd4814e69
chore(stability): remove into_cow feature gate
2015-04-02 13:01:49 -07:00
Florian Hartwig
3e456f00f9
fix(rustup): rustc 1.0.0-nightly (123a754cb 2015-03-24)
...
* fix `extern crate` declaration for rustc-serialize
* enable `into_cow` feature
* replace as_slice() calls by as_ref and enable `convert` feature
* use `core` feature in doc tests
2015-03-25 20:55:42 +01:00
Pyfisch
7397853148
feat(header): Support arbitary status codes
...
As discussed in #177 hyper must support status code outside the
standard range for compatibility reasons.
BREAKING CHANGE: This removes unregistered status codes from the enum. Use
`FromPrimitive` methods to create them now. StatusCode and StatusClass can no
longer be casted to `u16`, use `ToPrimitive` methods now.
For example `status.to_u16().unwrap()` to get the status code number.
2015-02-13 18:59:14 -08:00
Sean McArthur
2d55a22e73
feat(status): add is_<status_class>() methods to StatusCodes
2015-01-27 18:07:23 -08:00
Sean McArthur
9e3c94d764
fix(rustup): update to newest fmt trait names and slice syntax
2015-01-23 14:17:19 -08:00
Sean McArthur
f7124bb8e2
rustup: sweeping fixes for all the changes in 1.0-alpha
...
- Some switches to u64 instead of usize
- For now, allow(unstable)
- use associated types for all the Network stuff
2015-01-10 21:29:27 -08:00
cyderize
d9c657da73
Make status::StatusCode_0 pass
...
Needed to allow unstable.
Also, why do we depend on typeable? Removed from Cargo.toml
2015-01-10 19:36:51 +11:00
cyderize
122e94c8a6
Update for latest rust
...
Tracks rust nightly.
7 tests fail -- still finding source
2015-01-10 18:37:10 +11:00
Jonathan Reem
f0fe878ec8
More Rust updates:
...
- Some stray deriving -> derive changes
- use::{mod} -> use::{self}
- fmt.write -> fmt.write_str
This does not catch the last case of fmt.write_str in the
Show impl of a Header Item. This will need to be changed
separately.
2015-01-05 22:50:10 +01:00
Jonathan Reem
7f3a33f903
#[deriving] -> #[derive]
2015-01-03 20:31:48 +01:00
Sean McArthur
0bba6e80ee
rust upgrade
2014-12-12 12:24:54 -08:00
Sean McArthur
fec030a21e
rust upgrade
2014-12-02 13:12:04 -08:00
Sean McArthur
97c8276134
adjust doc comment about Unsigned
2014-11-20 16:25:33 -08:00
Sean McArthur
626fe9d91e
rustup: fmt changes
2014-11-20 10:28:09 -08:00
Jakob Gillich
35b7ec132e
refactor(status): replace glob with namespaced variants
2014-11-19 22:07:04 +01:00
Kyle Dewey
d7e8b8b117
Now using use along with enums, as per https://github.com/rust-lang/rust/pull/18973 .
2014-11-19 22:03:41 +01:00
Michael Hart
1acf567061
Update hash_map and fmt usages
...
Depends on https://github.com/carllerche/curl-rust/pull/24 and
https://github.com/chris-morgan/rust-http/pull/167
2014-11-04 12:34:35 -05:00
Sean McArthur
c905111f8c
implementation
2014-09-01 18:39:24 -07:00