Expand description
RPC engine: handles incoming RPC requests, dispatches to handlers, and manages request/response lifecycle with timeouts and streaming. Port of Go’s pkg/wshutil/wshrpc.go (WshRpc struct + handler dispatch).
Structs§
- RpcRequest
Handler - Tracks an outgoing request and collects responses.
Matches Go’s
RpcRequestHandler. - RpcResponse
Handler - Allows an RPC handler to send responses back to the caller.
Matches Go’s
RpcResponseHandler. - WshRpc
Engine - Core RPC engine: handles incoming RPC requests, dispatches to registered command handlers, and manages request/response lifecycle.
Constants§
Type Aliases§
- Command
Handler - A boxed async handler function. Takes the command data and returns either:
- Dispatch
Guard - Decides, before a command’s handler runs, whether this connection may call it:
Erris the refusal the caller is sent. Set per connection by srv (server::dispatch_guard). - Handler
Result - Result type for RPC handler responses.
- Stream
Handler - A streaming handler that returns a channel of responses.