Derive Macro fluvio_protocol_derive::RequestApi[][src]

    // Attributes available to this derive:
Expand description

Custom derive for implementing Request trait. This derives requires fluvio


use fluvio_protocol::{Encoder, Decoder};
use fluvio_protocol::api::Request;
use fluvio_protocol::derive::RequestApi as Request;

#[fluvio(default,api_min_version = 5, api_max_version = 6, api_key = 10, response = "SimpleResponse")]
#[derive(Debug, Default, Encoder, Decoder, Request)]
pub struct SimpleRequest {
    val: u8

#[derive(Debug, Default, Encoder, Decoder)]
pub struct SimpleResponse {
    pub value: i8,

RequestApi derives respects following attributes in fluvio

  • api_min_version: min version that API supports. This is required
  • api_max_version: max version that API supports. This is optional.
  • api_key: API number. This is required
  • response: Response struct. This is required