File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ impl WebSocket {
98
98
/// The error returned is [`JsError`]. See the
99
99
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket#exceptions_thrown)
100
100
/// to learn more.
101
+ ///
102
+ /// This function requires `json` features because protocols are parsed by `serde` into `JsValue`.
103
+ #[ cfg_attr( docsrs, doc( cfg( feature = "json" ) ) ) ]
104
+ #[ cfg( feature = "json" ) ]
101
105
pub fn open_with_protocols < S : AsRef < str > + serde:: Serialize > (
102
106
url : & str ,
103
107
protocols : & [ S ] ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use gloo_utils::errors::JsError;
11
11
use std:: fmt;
12
12
13
13
/// Message sent to and received from WebSocket.
14
- #[ derive( Debug , PartialEq , Clone ) ]
14
+ #[ derive( Debug , PartialEq , Eq , Clone ) ]
15
15
pub enum Message {
16
16
/// String message
17
17
Text ( String ) ,
You can’t perform that action at this time.
0 commit comments