pub struct KafkaProtocolHandler { /* private fields */ }Expand description
Kafka protocol handler
Implementations§
Source§impl KafkaProtocolHandler
impl KafkaProtocolHandler
Sourcepub fn parse_request(&self, data: &[u8]) -> Result<KafkaRequest, Error>
pub fn parse_request(&self, data: &[u8]) -> Result<KafkaRequest, Error>
Parse a Kafka request from bytes
Sourcepub fn serialize_response(
&self,
response: &KafkaResponse,
correlation_id: i32,
) -> Result<Vec<u8>, Error>
pub fn serialize_response( &self, response: &KafkaResponse, correlation_id: i32, ) -> Result<Vec<u8>, Error>
Serialize a Kafka response to bytes
Sourcepub fn is_api_version_supported(&self, api_key: i16, version: i16) -> bool
pub fn is_api_version_supported(&self, api_key: i16, version: i16) -> bool
Check if API version is supported
Trait Implementations§
Source§impl Debug for KafkaProtocolHandler
impl Debug for KafkaProtocolHandler
Auto Trait Implementations§
impl Freeze for KafkaProtocolHandler
impl RefUnwindSafe for KafkaProtocolHandler
impl Send for KafkaProtocolHandler
impl Sync for KafkaProtocolHandler
impl Unpin for KafkaProtocolHandler
impl UnwindSafe for KafkaProtocolHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more