#[non_exhaustive]pub struct MetadataResponsePartition {
pub error_code: i16,
pub partition_index: i32,
pub leader_id: BrokerId,
pub leader_epoch: i32,
pub replica_nodes: Vec<BrokerId>,
pub isr_nodes: Vec<BrokerId>,
pub offline_replicas: Vec<BrokerId>,
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 partition error, or 0 if there was no error.
Supported API versions: 0-12
partition_index: i32
The partition index.
Supported API versions: 0-12
leader_id: BrokerId
The ID of the leader broker.
Supported API versions: 0-12
leader_epoch: i32
The leader epoch of this partition.
Supported API versions: 7-12
replica_nodes: Vec<BrokerId>
The set of all nodes that host this partition.
Supported API versions: 0-12
isr_nodes: Vec<BrokerId>
The set of nodes that are in sync with the leader for this partition.
Supported API versions: 0-12
offline_replicas: Vec<BrokerId>
The set of offline replicas of this partition.
Supported API versions: 5-12
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl MetadataResponsePartition
impl MetadataResponsePartition
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 partition error, or 0 if there was no error.
Supported API versions: 0-12
Sourcepub fn with_partition_index(self, value: i32) -> Self
pub fn with_partition_index(self, value: i32) -> Self
Sets partition_index
to the passed value.
The partition index.
Supported API versions: 0-12
Sourcepub fn with_leader_id(self, value: BrokerId) -> Self
pub fn with_leader_id(self, value: BrokerId) -> Self
Sets leader_id
to the passed value.
The ID of the leader broker.
Supported API versions: 0-12
Sourcepub fn with_leader_epoch(self, value: i32) -> Self
pub fn with_leader_epoch(self, value: i32) -> Self
Sets leader_epoch
to the passed value.
The leader epoch of this partition.
Supported API versions: 7-12
Sourcepub fn with_replica_nodes(self, value: Vec<BrokerId>) -> Self
pub fn with_replica_nodes(self, value: Vec<BrokerId>) -> Self
Sets replica_nodes
to the passed value.
The set of all nodes that host this partition.
Supported API versions: 0-12
Sourcepub fn with_isr_nodes(self, value: Vec<BrokerId>) -> Self
pub fn with_isr_nodes(self, value: Vec<BrokerId>) -> Self
Sets isr_nodes
to the passed value.
The set of nodes that are in sync with the leader for this partition.
Supported API versions: 0-12
Sourcepub fn with_offline_replicas(self, value: Vec<BrokerId>) -> Self
pub fn with_offline_replicas(self, value: Vec<BrokerId>) -> Self
Sets offline_replicas
to the passed value.
The set of offline replicas of this partition.
Supported API versions: 5-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 MetadataResponsePartition
impl Clone for MetadataResponsePartition
Source§fn clone(&self) -> MetadataResponsePartition
fn clone(&self) -> MetadataResponsePartition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MetadataResponsePartition
impl Debug for MetadataResponsePartition
Source§impl Decodable for MetadataResponsePartition
Available on crate feature client
only.
impl Decodable for MetadataResponsePartition
client
only.Source§impl Default for MetadataResponsePartition
impl Default for MetadataResponsePartition
Source§impl Encodable for MetadataResponsePartition
Available on crate feature broker
only.
impl Encodable for MetadataResponsePartition
broker
only.