Skip to main content

ControllerApiVersions

Trait ControllerApiVersions 

Source
pub trait ControllerApiVersions: Send + Sync {
    // Required method
    fn respond(
        &self,
        request_version: i16,
        request_body: &[u8],
    ) -> Result<Bytes, RaftHandshakeError>;
}
Expand description

The controller listener’s ApiVersions answer, for a handshake that answers ApiVersions before the listener gets the connection.

Required Methods§

Source

fn respond( &self, request_version: i16, request_body: &[u8], ) -> Result<Bytes, RaftHandshakeError>

Answers one ApiVersions request with the response body. The body goes out behind a v0 response header, at the version the body was encoded at: the request version, or v0 for a version the listener does not serve.

§Errors

Returns RaftHandshakeError::Protocol when the body of a served version does not decode. Kafka closes such a connection.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§