Expand description
Protocol-1 wire envelope encode/decode.
Structs§
- Envelope
- Unified
{proto, type, method, params, id}envelope. - Error
Object - Structured error nested under envelope.error.
Enums§
- Message
Type - Message class values for the envelope
typefield.
Constants§
- CLIENT_
VERSION - Client version reported in
connection_init(crate version). - DEFAULT_
CLIENT_ CAPABILITIES - Default capabilities declared in the handshake.
- PROTO_
VERSION - Protocol version string.
Functions§
- as_str
- Coerce JSON value to string.
- decode_
message - Decode a WebSocket text frame into a JSON value.
- expand_
wire_ messages - Expand
event_batchframes into individual events. - new_
connection_ init - Build connection_init.
- new_
disconnect - Build disconnect notification.
- new_
notification - Build a notification envelope (no id).
- new_
ping - Build ping.
- new_
pong - Build pong.
- new_
request - Build a request envelope.
- new_
request_ id - Generate a 32-hex request id (UUID without dashes).
- new_
subscribe - Build a subscribe envelope.
- new_
unsubscribe - Build an unsubscribe envelope.
- params_
map - Map helper: insert string.
- unwrap_
next - Unwrap a
nextenvelope to its inner frame when possible.