mirror of https://github.com/fafhrd91/actix-web
Merge c1750c3a1f
into 0796f8e796
This commit is contained in:
commit
cbcdfa7e3d
|
@ -6,6 +6,7 @@
|
|||
|
||||
- Add `header::CLEAR_SITE_DATA` constant.
|
||||
- Add `Extensions::get_or_insert[_with]()` methods.
|
||||
- Add feature-gated `serde::Serialize` and `serde::Deserialize` implementations for `CloseCode` and `CloseReason`
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ ws = [
|
|||
"dep:sha1",
|
||||
]
|
||||
|
||||
serde = ["dep:serde"]
|
||||
|
||||
# TLS via OpenSSL
|
||||
openssl = ["__tls", "actix-tls/accept", "actix-tls/openssl"]
|
||||
|
||||
|
@ -121,6 +123,7 @@ language-tags = "0.3"
|
|||
mime = "0.3.4"
|
||||
percent-encoding = "2.1"
|
||||
pin-project-lite = "0.2"
|
||||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
smallvec = "1.6.1"
|
||||
tokio = { version = "1.24.2", features = [] }
|
||||
tokio-util = { version = "0.7", features = ["io", "codec"] }
|
||||
|
|
|
@ -83,6 +83,7 @@ impl From<u8> for OpCode {
|
|||
|
||||
/// Status code used to indicate why an endpoint is closing the WebSocket connection.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum CloseCode {
|
||||
/// Indicates a normal closure, meaning that the purpose for which the connection was
|
||||
/// established has been fulfilled.
|
||||
|
@ -195,6 +196,7 @@ impl From<u16> for CloseCode {
|
|||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
/// Reason for closing the connection
|
||||
pub struct CloseReason {
|
||||
/// Exit code
|
||||
|
|
Loading…
Reference in New Issue