1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +01:00

add http3 variant to protocol enum

This commit is contained in:
Rob Ede 2021-01-06 18:58:24 +00:00
parent 51e9e1500b
commit 00ba8d5549
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
3 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,9 @@
# Changes
## Unreleased - 2021-xx-xx
### Added
* Add `Http3` to `Protocol` enum for future compatibility and also mark `#[non_exhaustive]`.
### Changed
* Update `actix-*` dependencies to tokio `1.0` based versions. [#1813]
* Bumped `rand` to `0.8`.

View File

@ -72,11 +72,13 @@ pub mod http {
pub use crate::message::ConnectionType;
}
/// HTTP protocol
/// A major HTTP protocol version.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Protocol {
Http1,
Http2,
Http3,
}
type ConnectCallback<IO> = dyn Fn(&IO, &mut Extensions);

View File

@ -580,6 +580,8 @@ where
peer_addr,
)),
},
proto => unimplemented!("Unsupported HTTP version: {:?}.", proto)
}
}
}