Expand description
WSCALL facade crate.
This crate re-exports the shared protocol layer and, via feature flags, the reusable server and client implementations.
Common usage:
[dependencies]
wscall = { version = "0.1.1", features = ["full"] }Use the server feature for WscallServer, the client feature for
WscallClient, or full to enable both.
Modules§
- client
- Client-side exports.
- protocol
- Shared protocol types and frame codec.
- server
- Server-side exports.
- validation
Structs§
- ApiContext
- Request context passed to API route handlers.
- ApiError
- Application-level error returned from handlers.
- Client
Connection Event - Lifecycle payload emitted when the client establishes a websocket session.
- Client
Disconnect Event - Lifecycle payload emitted when the client loses its websocket session.
- Error
Payload - Standard error payload embedded in API responses and event acknowledgements.
- Event
Context - Event context passed to event handlers.
- Event
Message - Server-originated event delivered to a registered client event handler.
- Exception
Context - Context passed to the global exception handler.
- File
Attachment - Inline attachment carried alongside JSON params or event data.
- Frame
Codec - Encodes and decodes WSCALL binary frames.
- Packet
Envelope - Full transport envelope before frame encoding.
- Server
Connection Context - Context passed to server connection lifecycle handlers.
- Server
Disconnect Context - Context passed to server disconnect lifecycle handlers.
- Server
Handle - Handle that can be cloned into request and event handlers for server push operations.
- Wscall
Client - Wscall
Server
Enums§
- Client
Error - Errors produced by the reusable WSCALL client.
- Encryption
Kind - Selects how the payload section of a frame is encoded.
- Message
Type - Distinguishes API messages from event messages inside a WSCALL frame.
- Packet
Body - JSON-level message body transported inside a WSCALL frame.
- Protocol
Error - Errors returned while encoding or decoding WSCALL frames.
- Server
Error - Errors produced by the reusable server runtime.
Traits§
- Validate
Params - Trait for custom parameter validation after JSON binding.