Crate request_response

source ·
Expand description

This crate contains a general request-response protocol. It is used to send requests to a set of recipients and wait for responses.

Modules§

  • The data source trait. Is what we use to derive the response data for a request This file contains the DataSource trait. This trait allows the [RequestResponseProtocol] to calculate/derive a response for a specific request. In the confirmation layer the implementer would be something like a [FeeMerkleTree] for fee catchup
  • The message type. Is the base type for all messages in the request-response protocol
  • The network traits. Is what we use to send and receive messages over the network as the protocol This file contains the Sender and Receiver traits. These traits are used by the [RequestResponseProtocol] to send and receive messages from a network or other source.
  • The recipient source trait. Is what we use to get the recipients that a specific message should expect responses from
  • The request trait. Is what we use to define a request and a corresponding response type This file contains the Request and Response traits. Any upstream that wants to use the [RequestResponseProtocol] needs to implement these traits for their specific types.
  • util 🔒
    Utility types and functions

Structs§

Enums§

Traits§

  • A trait for serializing and deserializing a type to and from a byte array. Request types and Response types will need to implement this trait

Type Aliases§