Expand description
This crate implements a JSON-RPC HTTP server using warp. It accepts POST requests
at / and requests over websocket at /ws.
Structs§
- Dispatcher that only allows specified methods.
- The server configuration
- Basic auth credentials, containing username and password.
- Invalid username or password was passed to
Credentials::verify. - A WebSocket message.
- A dispatcher, that can be composed from other dispatchers.
- A JSON-RPC server.
Enums§
- A server error.
Traits§
- A method dispatcher. These take a request and handle the method execution. Can be generated from an
implblock usingnimiq_jsonrpc_derive::service.
Functions§
- Connects a stream such that its items are sent to the client as notifications.
- Read the request and call a handler function if possible. This variant accepts calls with arguments.
- Read the request and call a handler function if possible. This variant accepts calls without arguments.
- Constructs an error response if necessary (i.e., if the request ID was set).
- Returns an error response for a method that was not found. This returns
None, if the request doesn’t expect a response.