Crate tokio_tungstenite_typed
source ·Expand description
§Feature flags
The following features are available:
json
: EnablesTextJsonCodec
andBinaryJsonCodec
which 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§
- BinaryJsonCodec
json
ACodec
that serializes messages as JSON usingserde_json
and transmits it as binary. Note that receiving messages works as both binary or text - TextJsonCodec
json
ACodec
that serializes messages as JSON usingserde_json
and transmits it as text. Note that receiving messages works as both binary or text - A version of
tokio_tungstenite::WebSocketStream
with type safe messages.
Enums§
- Errors that can happen when using this library.
- A WebSocket message contain a value of a known type.
- Specifies if the message should be encoded/decoded as text or binary for transmission over the wire
Traits§
- Trait for encoding and decoding WebSocket messages.