#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AlterShareGroupOffsetsPartitionError {
pub(super) code: i16,
pub(super) message: Option<String>,
pub(super) message_truncated: bool,
}
impl AlterShareGroupOffsetsPartitionError {
pub const fn code(&self) -> i16 {
self.code
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
pub const fn message_truncated(&self) -> bool {
self.message_truncated
}
pub fn into_parts(self) -> (i16, Option<String>, bool) {
(self.code, self.message, self.message_truncated)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AlterShareGroupOffsetsPartitionResult {
pub(super) topic: String,
pub(super) partition: i32,
pub(super) result: Result<[u8; 16], AlterShareGroupOffsetsPartitionError>,
}
impl AlterShareGroupOffsetsPartitionResult {
pub fn topic(&self) -> &str {
&self.topic
}
pub const fn partition(&self) -> i32 {
self.partition
}
pub const fn result(&self) -> &Result<[u8; 16], AlterShareGroupOffsetsPartitionError> {
&self.result
}
pub fn into_parts(
self,
) -> (
String,
i32,
Result<[u8; 16], AlterShareGroupOffsetsPartitionError>,
) {
(self.topic, self.partition, self.result)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AlterShareGroupOffsetsBatch {
pub(super) throttle_time_ms: u32,
pub(super) partitions: Vec<AlterShareGroupOffsetsPartitionResult>,
}
impl AlterShareGroupOffsetsBatch {
pub const fn throttle_time_ms(&self) -> u32 {
self.throttle_time_ms
}
pub fn partitions(&self) -> &[AlterShareGroupOffsetsPartitionResult] {
&self.partitions
}
pub fn into_parts(self) -> (u32, Vec<AlterShareGroupOffsetsPartitionResult>) {
(self.throttle_time_ms, self.partitions)
}
}