#[non_exhaustive]pub struct ElectLeadersRequest {
pub election_type: i8,
pub topic_partitions: Option<Vec<TopicPartitions>>,
pub timeout_ms: i32,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-2
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.election_type: i8
Type of elections to conduct for the partition. A value of ‘0’ elects the preferred replica. A value of ‘1’ elects the first live replica if there are no in-sync replica.
Supported API versions: 1-2
topic_partitions: Option<Vec<TopicPartitions>>
The topic partitions to elect leaders.
Supported API versions: 0-2
timeout_ms: i32
The time in ms to wait for the election to complete.
Supported API versions: 0-2
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl ElectLeadersRequest
impl ElectLeadersRequest
Sourcepub fn with_election_type(self, value: i8) -> Self
pub fn with_election_type(self, value: i8) -> Self
Sets election_type
to the passed value.
Type of elections to conduct for the partition. A value of ‘0’ elects the preferred replica. A value of ‘1’ elects the first live replica if there are no in-sync replica.
Supported API versions: 1-2
Sourcepub fn with_topic_partitions(self, value: Option<Vec<TopicPartitions>>) -> Self
pub fn with_topic_partitions(self, value: Option<Vec<TopicPartitions>>) -> Self
Sets topic_partitions
to the passed value.
The topic partitions to elect leaders.
Supported API versions: 0-2
Sourcepub fn with_timeout_ms(self, value: i32) -> Self
pub fn with_timeout_ms(self, value: i32) -> Self
Sets timeout_ms
to the passed value.
The time in ms to wait for the election to complete.
Supported API versions: 0-2
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 ElectLeadersRequest
impl Clone for ElectLeadersRequest
Source§fn clone(&self) -> ElectLeadersRequest
fn clone(&self) -> ElectLeadersRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ElectLeadersRequest
impl Debug for ElectLeadersRequest
Source§impl Decodable for ElectLeadersRequest
Available on crate feature broker
only.
impl Decodable for ElectLeadersRequest
broker
only.Source§impl Default for ElectLeadersRequest
impl Default for ElectLeadersRequest
Source§impl Encodable for ElectLeadersRequest
Available on crate feature client
only.
impl Encodable for ElectLeadersRequest
client
only.Source§impl From<ElectLeadersRequest> for RequestKind
Available on crate feature messages_enums
only.
impl From<ElectLeadersRequest> for RequestKind
messages_enums
only.Source§fn from(value: ElectLeadersRequest) -> RequestKind
fn from(value: ElectLeadersRequest) -> RequestKind
Source§impl HeaderVersion for ElectLeadersRequest
impl HeaderVersion for ElectLeadersRequest
Source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
Source§impl Message for ElectLeadersRequest
impl Message for ElectLeadersRequest
Source§const VERSIONS: VersionRange
const VERSIONS: VersionRange
Source§const DEPRECATED_VERSIONS: Option<VersionRange> = None
const DEPRECATED_VERSIONS: Option<VersionRange> = None
Source§impl PartialEq for ElectLeadersRequest
impl PartialEq for ElectLeadersRequest
Source§impl Request for ElectLeadersRequest
Available on crate features client
and broker
only.
impl Request for ElectLeadersRequest
client
and broker
only.