Expand description
§Feature flags
The following features are available:
json: EnablesTextJsonCodecandBinaryJsonCodecwhich encodes message as JSON usingserde_json. Enabled by default.msgpack: Enables [MsgPackCodec] which encodes message as MessagePack usingrmp-serde.native-tls,rustls-tls-native-roots,rustls-tls-webpki-roots: Enables the specified tls backend in tungstenite
Structs§
- Binary
Json Codec json - A
Codecthat serializes messages as JSON usingserde_jsonand transmits it as binary. Note that receiving messages works as both binary or text - Text
Json Codec json - A
Codecthat serializes messages as JSON usingserde_jsonand transmits it as text. Note that receiving messages works as both binary or text - WebSocket
json - A version of
tokio_tungstenite::WebSocketStreamwith type safe messages.
Enums§
- Error
- Errors that can happen when using this library.
- Message
- A WebSocket message contain a value of a known type.
- Text
OrBinary - Specifies if the message should be encoded/decoded as text or binary for transmission over the wire
Traits§
- Codec
- Trait for encoding and decoding WebSocket messages.