#[non_exhaustive]pub struct ElectLeadersRequest {
pub election_type: i8,
pub topic_partitions: Option<IndexMap<TopicName, 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: i8Type 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<IndexMap<TopicName, TopicPartitions>>The topic partitions to elect leaders.
Supported API versions: 0-2
timeout_ms: i32The 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<IndexMap<TopicName, TopicPartitions>>,
) -> Self
pub fn with_topic_partitions( self, value: Option<IndexMap<TopicName, 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
impl Decodable for ElectLeadersRequest
source§impl Default for ElectLeadersRequest
impl Default for ElectLeadersRequest
source§impl Encodable for ElectLeadersRequest
impl Encodable for ElectLeadersRequest
source§impl From<ElectLeadersRequest> for RequestKind
impl From<ElectLeadersRequest> for RequestKind
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
impl Request for ElectLeadersRequest
impl StructuralPartialEq for ElectLeadersRequest
Auto Trait Implementations§
impl Freeze for ElectLeadersRequest
impl RefUnwindSafe for ElectLeadersRequest
impl Send for ElectLeadersRequest
impl Sync for ElectLeadersRequest
impl Unpin for ElectLeadersRequest
impl UnwindSafe for ElectLeadersRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)