Skip to main content

Crate wscall

Crate wscall 

Source
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.
ClientConnectionEvent
Lifecycle payload emitted when the client establishes a websocket session.
ClientDisconnectEvent
Lifecycle payload emitted when the client loses its websocket session.
ErrorPayload
Standard error payload embedded in API responses and event acknowledgements.
EventContext
Event context passed to event handlers.
EventMessage
Server-originated event delivered to a registered client event handler.
ExceptionContext
Context passed to the global exception handler.
FileAttachment
Inline attachment carried alongside JSON params or event data.
FrameCodec
Encodes and decodes WSCALL binary frames.
PacketEnvelope
Full transport envelope before frame encoding.
ServerConnectionContext
Context passed to server connection lifecycle handlers.
ServerDisconnectContext
Context passed to server disconnect lifecycle handlers.
ServerHandle
Handle that can be cloned into request and event handlers for server push operations.
WscallClient
WscallServer

Enums§

ClientError
Errors produced by the reusable WSCALL client.
EncryptionKind
Selects how the payload section of a frame is encoded.
MessageType
Distinguishes API messages from event messages inside a WSCALL frame.
PacketBody
JSON-level message body transported inside a WSCALL frame.
ProtocolError
Errors returned while encoding or decoding WSCALL frames.
ServerError
Errors produced by the reusable server runtime.

Traits§

ValidateParams
Trait for custom parameter validation after JSON binding.