Crate nimiq_jsonrpc_server

Source
Expand description

This crate implements a JSON-RPC HTTP server using warp. It accepts POST requests at / and requests over websocket at /ws.

Structs§

Enums§

Traits§

  • A method dispatcher. These take a request and handle the method execution. Can be generated from an impl block using nimiq_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.