kafka_client_engine/admin/describe_share_group/
result.rs1#[derive(Clone, Debug, Eq, PartialEq)]
5pub struct DescribeShareGroupTopicAssignment {
6 pub(super) topic_id: [u8; 16],
7 pub(super) topic_name: String,
8 pub(super) partitions: Vec<i32>,
9}
10
11impl DescribeShareGroupTopicAssignment {
12 pub fn into_parts(self) -> ([u8; 16], String, Vec<i32>) {
14 (self.topic_id, self.topic_name, self.partitions)
15 }
16}
17
18#[derive(Clone, Debug, Eq, PartialEq)]
20pub struct DescribeShareGroupAssignment {
21 pub(super) topics: Vec<DescribeShareGroupTopicAssignment>,
22}
23
24impl DescribeShareGroupAssignment {
25 pub fn into_topics(self) -> Vec<DescribeShareGroupTopicAssignment> {
27 self.topics
28 }
29}
30
31#[derive(Clone, Debug, Eq, PartialEq)]
33pub struct DescribeShareGroupMember {
34 pub(super) member_id: String,
35 pub(super) rack_id: Option<String>,
36 pub(super) member_epoch: i32,
37 pub(super) client_id: String,
38 pub(super) client_host: String,
39 pub(super) subscribed_topic_names: Vec<String>,
40 pub(super) assignment: DescribeShareGroupAssignment,
41}
42
43impl DescribeShareGroupMember {
44 #[allow(clippy::type_complexity)]
46 pub fn into_parts(
47 self,
48 ) -> (
49 String,
50 Option<String>,
51 i32,
52 String,
53 String,
54 Vec<String>,
55 DescribeShareGroupAssignment,
56 ) {
57 (
58 self.member_id,
59 self.rack_id,
60 self.member_epoch,
61 self.client_id,
62 self.client_host,
63 self.subscribed_topic_names,
64 self.assignment,
65 )
66 }
67}
68
69#[derive(Clone, Debug, Eq, PartialEq)]
71pub struct DescribeShareGroupDescription {
72 pub(super) group_id: String,
73 pub(super) state: String,
74 pub(super) group_epoch: i32,
75 pub(super) assignment_epoch: i32,
76 pub(super) assignor_name: String,
77 pub(super) members: Vec<DescribeShareGroupMember>,
78 pub(super) authorized_operations: Option<i32>,
79}
80
81impl DescribeShareGroupDescription {
82 pub fn group_id(&self) -> &str {
84 &self.group_id
85 }
86
87 #[allow(clippy::type_complexity)]
89 pub fn into_parts(
90 self,
91 ) -> (
92 String,
93 String,
94 i32,
95 i32,
96 String,
97 Vec<DescribeShareGroupMember>,
98 Option<i32>,
99 ) {
100 (
101 self.group_id,
102 self.state,
103 self.group_epoch,
104 self.assignment_epoch,
105 self.assignor_name,
106 self.members,
107 self.authorized_operations,
108 )
109 }
110}
111
112#[derive(Clone, Debug, Eq, PartialEq)]
114pub struct DescribeShareGroupResult {
115 pub(super) throttle_time_ms: u32,
116 pub(super) description: DescribeShareGroupDescription,
117}
118
119impl DescribeShareGroupResult {
120 pub const fn throttle_time_ms(&self) -> u32 {
122 self.throttle_time_ms
123 }
124
125 pub const fn description(&self) -> &DescribeShareGroupDescription {
127 &self.description
128 }
129
130 pub fn into_parts(self) -> (u32, DescribeShareGroupDescription) {
132 (self.throttle_time_ms, self.description)
133 }
134}