#[non_exhaustive]pub struct OffsetForLeaderPartition {
pub partition: i32,
pub current_leader_epoch: i32,
pub leader_epoch: i32,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}
Expand description
Valid versions: 0-4
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.partition: i32
The partition index.
Supported API versions: 0-4
current_leader_epoch: i32
An epoch used to fence consumers/replicas with old metadata. If the epoch provided by the client is larger than the current epoch known to the broker, then the UNKNOWN_LEADER_EPOCH error code will be returned. If the provided epoch is smaller, then the FENCED_LEADER_EPOCH error code will be returned.
Supported API versions: 2-4
leader_epoch: i32
The epoch to look up an offset for.
Supported API versions: 0-4
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl OffsetForLeaderPartition
impl OffsetForLeaderPartition
Sourcepub fn with_partition(self, value: i32) -> Self
pub fn with_partition(self, value: i32) -> Self
Sets partition
to the passed value.
The partition index.
Supported API versions: 0-4
Sourcepub fn with_current_leader_epoch(self, value: i32) -> Self
pub fn with_current_leader_epoch(self, value: i32) -> Self
Sets current_leader_epoch
to the passed value.
An epoch used to fence consumers/replicas with old metadata. If the epoch provided by the client is larger than the current epoch known to the broker, then the UNKNOWN_LEADER_EPOCH error code will be returned. If the provided epoch is smaller, then the FENCED_LEADER_EPOCH error code will be returned.
Supported API versions: 2-4
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 epoch to look up an offset for.
Supported API versions: 0-4
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 OffsetForLeaderPartition
impl Clone for OffsetForLeaderPartition
Source§fn clone(&self) -> OffsetForLeaderPartition
fn clone(&self) -> OffsetForLeaderPartition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OffsetForLeaderPartition
impl Debug for OffsetForLeaderPartition
Source§impl Decodable for OffsetForLeaderPartition
Available on crate feature broker
only.
impl Decodable for OffsetForLeaderPartition
broker
only.Source§impl Default for OffsetForLeaderPartition
impl Default for OffsetForLeaderPartition
Source§impl Encodable for OffsetForLeaderPartition
Available on crate feature client
only.
impl Encodable for OffsetForLeaderPartition
client
only.