kafka_client_engine/admin/describe_features/
description.rs1#[derive(Clone, Debug, Eq, PartialEq)]
5pub struct DescribeFeaturesSupportedFeature {
6 pub(super) name: String,
7 pub(super) min_version: i16,
8 pub(super) max_version: i16,
9}
10
11impl DescribeFeaturesSupportedFeature {
12 pub fn name(&self) -> &str {
14 &self.name
15 }
16
17 pub const fn min_version(&self) -> i16 {
19 self.min_version
20 }
21
22 pub const fn max_version(&self) -> i16 {
24 self.max_version
25 }
26
27 pub fn into_parts(self) -> (String, i16, i16) {
29 (self.name, self.min_version, self.max_version)
30 }
31}
32
33#[derive(Clone, Debug, Eq, PartialEq)]
35pub struct DescribeFeaturesFinalizedFeature {
36 pub(super) name: String,
37 pub(super) min_version_level: i16,
38 pub(super) max_version_level: i16,
39}
40
41impl DescribeFeaturesFinalizedFeature {
42 pub fn name(&self) -> &str {
44 &self.name
45 }
46
47 pub const fn min_version_level(&self) -> i16 {
49 self.min_version_level
50 }
51
52 pub const fn max_version_level(&self) -> i16 {
54 self.max_version_level
55 }
56
57 pub fn into_parts(self) -> (String, i16, i16) {
59 (self.name, self.min_version_level, self.max_version_level)
60 }
61}
62
63#[derive(Clone, Debug, Eq, PartialEq)]
65pub struct DescribeFeaturesDescription {
66 pub(super) throttle_time_ms: u32,
67 pub(super) supported_features: Vec<DescribeFeaturesSupportedFeature>,
68 pub(super) supported_features_complete: bool,
69 pub(super) finalized_features_epoch: Option<i64>,
70 pub(super) finalized_features: Vec<DescribeFeaturesFinalizedFeature>,
71 pub(super) zk_migration_ready: bool,
72}
73
74impl DescribeFeaturesDescription {
75 pub const fn throttle_time_ms(&self) -> u32 {
77 self.throttle_time_ms
78 }
79
80 pub const fn supported_features_complete(&self) -> bool {
82 self.supported_features_complete
83 }
84
85 pub fn supported_features(&self) -> &[DescribeFeaturesSupportedFeature] {
87 &self.supported_features
88 }
89
90 pub const fn finalized_features_epoch(&self) -> Option<i64> {
92 self.finalized_features_epoch
93 }
94
95 pub fn finalized_features(&self) -> &[DescribeFeaturesFinalizedFeature] {
97 &self.finalized_features
98 }
99
100 pub const fn zk_migration_ready(&self) -> bool {
102 self.zk_migration_ready
103 }
104
105 #[allow(clippy::type_complexity)]
107 pub fn into_parts(
108 self,
109 ) -> (
110 u32,
111 Vec<DescribeFeaturesSupportedFeature>,
112 bool,
113 Option<i64>,
114 Vec<DescribeFeaturesFinalizedFeature>,
115 bool,
116 ) {
117 (
118 self.throttle_time_ms,
119 self.supported_features,
120 self.supported_features_complete,
121 self.finalized_features_epoch,
122 self.finalized_features,
123 self.zk_migration_ready,
124 )
125 }
126}