Crate tokio_tungstenite_typed

Crate tokio_tungstenite_typed 

Source
Expand description

§Feature flags

The following features are available:

  • json: Enables TextJsonCodec and BinaryJsonCodec which encodes message as JSON using serde_json. Enabled by default.
  • msgpack: Enables [MsgPackCodec] which encodes message as MessagePack using rmp-serde.
  • native-tls, rustls-tls-native-roots, rustls-tls-webpki-roots: Enables the specified tls backend in tungstenite

Structs§

BinaryJsonCodecjson
A Codec that serializes messages as JSON using serde_json and transmits it as binary. Note that receiving messages works as both binary or text
TextJsonCodecjson
A Codec that serializes messages as JSON using serde_json and transmits it as text. Note that receiving messages works as both binary or text
WebSocketjson
A version of tokio_tungstenite::WebSocketStream with type safe messages.

Enums§

Error
Errors that can happen when using this library.
Message
A WebSocket message contain a value of a known type.
TextOrBinary
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.