#[non_exhaustive]pub struct LeaderChangeMessage {
pub version: i16,
pub leader_id: BrokerId,
pub voters: Vec<Voter>,
pub granting_voters: Vec<Voter>,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-1
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.version: i16
The version of the leader change message
Supported API versions: 0-1
leader_id: BrokerId
The ID of the newly elected leader
Supported API versions: 0-1
voters: Vec<Voter>
The set of voters in the quorum for this epoch
Supported API versions: 0-1
granting_voters: Vec<Voter>
The voters who voted for the leader at the time of election
Supported API versions: 0-1
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl LeaderChangeMessage
impl LeaderChangeMessage
Sourcepub fn with_version(self, value: i16) -> Self
pub fn with_version(self, value: i16) -> Self
Sets version
to the passed value.
The version of the leader change message
Supported API versions: 0-1
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 newly elected leader
Supported API versions: 0-1
Sourcepub fn with_voters(self, value: Vec<Voter>) -> Self
pub fn with_voters(self, value: Vec<Voter>) -> Self
Sets voters
to the passed value.
The set of voters in the quorum for this epoch
Supported API versions: 0-1
Sourcepub fn with_granting_voters(self, value: Vec<Voter>) -> Self
pub fn with_granting_voters(self, value: Vec<Voter>) -> Self
Sets granting_voters
to the passed value.
The voters who voted for the leader at the time of election
Supported API versions: 0-1
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 LeaderChangeMessage
impl Clone for LeaderChangeMessage
Source§fn clone(&self) -> LeaderChangeMessage
fn clone(&self) -> LeaderChangeMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more