RequestBody

Trait RequestBody 

Source
pub trait RequestBody {
    type ResponseBody;

    const API_KEY: ApiKey;
    const API_VERSION_RANGE: ApiVersionRange;
    const FIRST_TAGGED_FIELD_IN_REQUEST_VERSION: ApiVersion;
    const FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION: ApiVersion = Self::FIRST_TAGGED_FIELD_IN_REQUEST_VERSION;
}
Expand description

Specifies a request body.

Required Associated Constants§

Source

const API_KEY: ApiKey

Kafka API key.

This will be added to the request header.

Source

const API_VERSION_RANGE: ApiVersionRange

Supported version range.

From this range and the range that the broker reports, we will pick the highest version that both support.

Source

const FIRST_TAGGED_FIELD_IN_REQUEST_VERSION: ApiVersion

The first version of the messages (not of the header) that uses tagged fields, if any.

To determine the version just look for the _tagged_fields or TAG_BUFFER in the protocol description.

This will be used to control which request and response header versions will be used.

It’s OK to specify a version here that is larger then the highest supported version.

Provided Associated Constants§

Source

const FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION: ApiVersion = Self::FIRST_TAGGED_FIELD_IN_REQUEST_VERSION

Normally the same as FIRST_TAGGED_FIELD_IN_REQUEST_VERSION but there are some special snowflakes.

Required Associated Types§

Source

type ResponseBody

The response type that will follow when issuing this request.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: RequestBody> RequestBody for &T

Source§

const API_KEY: ApiKey = T::API_KEY

Source§

const API_VERSION_RANGE: ApiVersionRange = T::API_VERSION_RANGE

Source§

const FIRST_TAGGED_FIELD_IN_REQUEST_VERSION: ApiVersion = T::FIRST_TAGGED_FIELD_IN_REQUEST_VERSION

Source§

const FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION: ApiVersion = T::FIRST_TAGGED_FIELD_IN_RESPONSE_VERSION

Source§

type ResponseBody = <T as RequestBody>::ResponseBody

Implementors§

Source§

impl RequestBody for ApiVersionsRequest

Source§

impl RequestBody for CreateTopicsRequest

Source§

impl RequestBody for DeleteRecordsRequest

Source§

impl RequestBody for DeleteTopicsRequest

Source§

impl RequestBody for FetchRequest

Source§

impl RequestBody for ListOffsetsRequest

Source§

impl RequestBody for MetadataRequest

Source§

impl RequestBody for ProduceRequest