Skip to content

Commit

Permalink
Make the field private
Browse files Browse the repository at this point in the history
  • Loading branch information
kazk committed Jan 6, 2023
1 parent a7c0056 commit 54fd7a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/sec_websocket_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ use {Error, Header, HeaderValue};
/// [RFC6455_11.3.2]: https://tools.ietf.org/html/rfc6455#section-11.3.2
/// [RFC7692_7]: https://tools.ietf.org/html/rfc7692#section-7
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SecWebsocketExtensions(pub Vec<WebsocketExtension>);
pub struct SecWebsocketExtensions(Vec<WebsocketExtension>);

impl Header for SecWebsocketExtensions {
fn name() -> &'static ::HeaderName {
Expand Down Expand Up @@ -125,6 +125,12 @@ impl SecWebsocketExtensions {
}
}

impl From<Vec<WebsocketExtension>> for SecWebsocketExtensions {
fn from(extensions: Vec<WebsocketExtension>) -> SecWebsocketExtensions {
SecWebsocketExtensions(extensions)
}
}

impl TryFrom<&str> for SecWebsocketExtensions {
type Error = Error;

Expand Down

0 comments on commit 54fd7a1

Please sign in to comment.