#[non_exhaustive]pub struct MetadataResponseTopic {
pub error_code: i16,
pub name: Option<TopicName>,
pub topic_id: Uuid,
pub is_internal: bool,
pub partitions: Vec<MetadataResponsePartition>,
pub topic_authorized_operations: i32,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-12
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.error_code: i16
The topic error, or 0 if there was no error.
Supported API versions: 0-12
name: Option<TopicName>
The topic name. Null for non-existing topics queried by ID. This is never null when ErrorCode is zero. One of Name and TopicId is always populated.
Supported API versions: 0-12
topic_id: Uuid
The topic id. Zero for non-existing topics queried by name. This is never zero when ErrorCode is zero. One of Name and TopicId is always populated.
Supported API versions: 10-12
is_internal: bool
True if the topic is internal.
Supported API versions: 1-12
partitions: Vec<MetadataResponsePartition>
Each partition in the topic.
Supported API versions: 0-12
32-bit bitfield to represent authorized operations for this topic.
Supported API versions: 8-12
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl MetadataResponseTopic
impl MetadataResponseTopic
Sourcepub fn with_error_code(self, value: i16) -> Self
pub fn with_error_code(self, value: i16) -> Self
Sets error_code
to the passed value.
The topic error, or 0 if there was no error.
Supported API versions: 0-12
Sourcepub fn with_name(self, value: Option<TopicName>) -> Self
pub fn with_name(self, value: Option<TopicName>) -> Self
Sets name
to the passed value.
The topic name. Null for non-existing topics queried by ID. This is never null when ErrorCode is zero. One of Name and TopicId is always populated.
Supported API versions: 0-12
Sourcepub fn with_topic_id(self, value: Uuid) -> Self
pub fn with_topic_id(self, value: Uuid) -> Self
Sets topic_id
to the passed value.
The topic id. Zero for non-existing topics queried by name. This is never zero when ErrorCode is zero. One of Name and TopicId is always populated.
Supported API versions: 10-12
Sourcepub fn with_is_internal(self, value: bool) -> Self
pub fn with_is_internal(self, value: bool) -> Self
Sets is_internal
to the passed value.
True if the topic is internal.
Supported API versions: 1-12
Sourcepub fn with_partitions(self, value: Vec<MetadataResponsePartition>) -> Self
pub fn with_partitions(self, value: Vec<MetadataResponsePartition>) -> Self
Sets partitions
to the passed value.
Each partition in the topic.
Supported API versions: 0-12
Sets topic_authorized_operations
to the passed value.
32-bit bitfield to represent authorized operations for this topic.
Supported API versions: 8-12
Sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
Sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
Source§impl Clone for MetadataResponseTopic
impl Clone for MetadataResponseTopic
Source§fn clone(&self) -> MetadataResponseTopic
fn clone(&self) -> MetadataResponseTopic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MetadataResponseTopic
impl Debug for MetadataResponseTopic
Source§impl Decodable for MetadataResponseTopic
Available on crate feature client
only.
impl Decodable for MetadataResponseTopic
client
only.Source§impl Default for MetadataResponseTopic
impl Default for MetadataResponseTopic
Source§impl Encodable for MetadataResponseTopic
Available on crate feature broker
only.
impl Encodable for MetadataResponseTopic
broker
only.