Skip to main content

api

Attribute Macro api 

Source
#[api]
Expand description

Macro for marking traits defining api’s interface.

It will generate the following:

  • Consumer struct implementing Consume trait - which can be used to make requests,
  • Request enum - serializable structure representing request type with its arguments,
  • Response enum - serializable structure representing response to a request,
  • impl_produce macro which is used by Produce derive macro to implement producer::Produce trait.