Skip to main content

kacrab_protocol/generated/
controlled_shutdown_response.rs

1//! Generated from ControlledShutdownResponse.json - DO NOT EDIT
2#![allow(
3    missing_docs,
4    clippy::all,
5    clippy::pedantic,
6    clippy::nursery,
7    clippy::arithmetic_side_effects,
8    reason = "Generated protocol modules mirror Kafka's schema shape and intentionally trade \
9              hand-written lint style for reproducible wire-code output."
10)]
11use bytes::{Bytes, BytesMut};
12
13use crate::*;
14
15#[derive(Debug, Clone, PartialEq)]
16pub struct ControlledShutdownResponseData {
17    pub _unknown_tagged_fields: Vec<RawTaggedField>,
18}
19impl Default for ControlledShutdownResponseData {
20    fn default() -> Self {
21        Self {
22            _unknown_tagged_fields: Vec::new(),
23        }
24    }
25}
26impl ControlledShutdownResponseData {
27    pub fn read(_buf: &mut Bytes, version: i16) -> Result<Self> {
28        if version < 0 || version > -1 {
29            return Err(UnsupportedVersion::new(7, version).into());
30        }
31        let mut _unknown_tagged_fields: Vec<RawTaggedField> = Vec::new();
32        Ok(Self {
33            _unknown_tagged_fields,
34        })
35    }
36    pub fn write(&self, _buf: &mut BytesMut, version: i16) -> Result<()> {
37        if version < 0 || version > -1 {
38            return Err(UnsupportedVersion::new(7, version).into());
39        }
40        Ok(())
41    }
42    pub fn encoded_len(&self, version: i16) -> Result<usize> {
43        if version < 0 || version > -1 {
44            return Err(UnsupportedVersion::new(7, version).into());
45        }
46        let len: usize = 0;
47        Ok(len)
48    }
49}