#[non_exhaustive]pub struct LeaderAndIsrRequest {
pub controller_id: BrokerId,
pub is_k_raft_controller: bool,
pub controller_epoch: i32,
pub broker_epoch: i64,
pub _type: i8,
pub ungrouped_partition_states: Vec<LeaderAndIsrPartitionState>,
pub topic_states: Vec<LeaderAndIsrTopicState>,
pub live_leaders: Vec<LeaderAndIsrLiveLeader>,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-7
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.controller_id: BrokerId
The current controller ID.
Supported API versions: 0-7
is_k_raft_controller: bool
If KRaft controller id is used during migration. See KIP-866
Supported API versions: 7
controller_epoch: i32
The current controller epoch.
Supported API versions: 0-7
broker_epoch: i64
The current broker epoch.
Supported API versions: 2-7
_type: i8
The type that indicates whether all topics are included in the request
Supported API versions: 5-7
ungrouped_partition_states: Vec<LeaderAndIsrPartitionState>
The state of each partition, in a v0 or v1 message.
Supported API versions: 0-1
topic_states: Vec<LeaderAndIsrTopicState>
Each topic.
Supported API versions: 2-7
live_leaders: Vec<LeaderAndIsrLiveLeader>
The current live leaders.
Supported API versions: 0-7
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl LeaderAndIsrRequest
impl LeaderAndIsrRequest
Sourcepub fn with_controller_id(self, value: BrokerId) -> Self
pub fn with_controller_id(self, value: BrokerId) -> Self
Sets controller_id
to the passed value.
The current controller ID.
Supported API versions: 0-7
Sourcepub fn with_is_k_raft_controller(self, value: bool) -> Self
pub fn with_is_k_raft_controller(self, value: bool) -> Self
Sets is_k_raft_controller
to the passed value.
If KRaft controller id is used during migration. See KIP-866
Supported API versions: 7
Sourcepub fn with_controller_epoch(self, value: i32) -> Self
pub fn with_controller_epoch(self, value: i32) -> Self
Sets controller_epoch
to the passed value.
The current controller epoch.
Supported API versions: 0-7
Sourcepub fn with_broker_epoch(self, value: i64) -> Self
pub fn with_broker_epoch(self, value: i64) -> Self
Sets broker_epoch
to the passed value.
The current broker epoch.
Supported API versions: 2-7
Sourcepub fn with_type(self, value: i8) -> Self
pub fn with_type(self, value: i8) -> Self
Sets _type
to the passed value.
The type that indicates whether all topics are included in the request
Supported API versions: 5-7
Sourcepub fn with_ungrouped_partition_states(
self,
value: Vec<LeaderAndIsrPartitionState>,
) -> Self
pub fn with_ungrouped_partition_states( self, value: Vec<LeaderAndIsrPartitionState>, ) -> Self
Sets ungrouped_partition_states
to the passed value.
The state of each partition, in a v0 or v1 message.
Supported API versions: 0-1
Sourcepub fn with_topic_states(self, value: Vec<LeaderAndIsrTopicState>) -> Self
pub fn with_topic_states(self, value: Vec<LeaderAndIsrTopicState>) -> Self
Sets topic_states
to the passed value.
Each topic.
Supported API versions: 2-7
Sourcepub fn with_live_leaders(self, value: Vec<LeaderAndIsrLiveLeader>) -> Self
pub fn with_live_leaders(self, value: Vec<LeaderAndIsrLiveLeader>) -> Self
Sets live_leaders
to the passed value.
The current live leaders.
Supported API versions: 0-7
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 LeaderAndIsrRequest
impl Clone for LeaderAndIsrRequest
Source§fn clone(&self) -> LeaderAndIsrRequest
fn clone(&self) -> LeaderAndIsrRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LeaderAndIsrRequest
impl Debug for LeaderAndIsrRequest
Source§impl Decodable for LeaderAndIsrRequest
Available on crate feature broker
only.
impl Decodable for LeaderAndIsrRequest
broker
only.Source§impl Default for LeaderAndIsrRequest
impl Default for LeaderAndIsrRequest
Source§impl Encodable for LeaderAndIsrRequest
Available on crate feature client
only.
impl Encodable for LeaderAndIsrRequest
client
only.Source§impl From<LeaderAndIsrRequest> for RequestKind
Available on crate feature messages_enums
only.
impl From<LeaderAndIsrRequest> for RequestKind
messages_enums
only.Source§fn from(value: LeaderAndIsrRequest) -> RequestKind
fn from(value: LeaderAndIsrRequest) -> RequestKind
Source§impl HeaderVersion for LeaderAndIsrRequest
impl HeaderVersion for LeaderAndIsrRequest
Source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
Source§impl Message for LeaderAndIsrRequest
impl Message for LeaderAndIsrRequest
Source§const VERSIONS: VersionRange
const VERSIONS: VersionRange
Source§const DEPRECATED_VERSIONS: Option<VersionRange> = None
const DEPRECATED_VERSIONS: Option<VersionRange> = None
Source§impl PartialEq for LeaderAndIsrRequest
impl PartialEq for LeaderAndIsrRequest
Source§impl Request for LeaderAndIsrRequest
Available on crate features client
and broker
only.
impl Request for LeaderAndIsrRequest
client
and broker
only.