#[non_exhaustive]pub struct PartitionSnapshot {
pub partition: i32,
pub current_leader_epoch: i32,
pub snapshot_id: SnapshotId,
pub position: i64,
pub replica_directory_id: Uuid,
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.partition: i32
The partition index
Supported API versions: 0-1
current_leader_epoch: i32
The current leader epoch of the partition, -1 for unknown leader epoch
Supported API versions: 0-1
snapshot_id: SnapshotId
The snapshot endOffset and epoch to fetch
Supported API versions: 0-1
position: i64
The byte position within the snapshot to start fetching from
Supported API versions: 0-1
replica_directory_id: Uuid
The directory id of the follower fetching
Supported API versions: 1
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl PartitionSnapshot
impl PartitionSnapshot
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-1
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.
The current leader epoch of the partition, -1 for unknown leader epoch
Supported API versions: 0-1
Sourcepub fn with_snapshot_id(self, value: SnapshotId) -> Self
pub fn with_snapshot_id(self, value: SnapshotId) -> Self
Sets snapshot_id
to the passed value.
The snapshot endOffset and epoch to fetch
Supported API versions: 0-1
Sourcepub fn with_position(self, value: i64) -> Self
pub fn with_position(self, value: i64) -> Self
Sets position
to the passed value.
The byte position within the snapshot to start fetching from
Supported API versions: 0-1
Sourcepub fn with_replica_directory_id(self, value: Uuid) -> Self
pub fn with_replica_directory_id(self, value: Uuid) -> Self
Sets replica_directory_id
to the passed value.
The directory id of the follower fetching
Supported API versions: 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 PartitionSnapshot
impl Clone for PartitionSnapshot
Source§fn clone(&self) -> PartitionSnapshot
fn clone(&self) -> PartitionSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PartitionSnapshot
impl Debug for PartitionSnapshot
Source§impl Decodable for PartitionSnapshot
Available on crate feature broker
only.
impl Decodable for PartitionSnapshot
broker
only.Source§impl Default for PartitionSnapshot
impl Default for PartitionSnapshot
Source§impl Encodable for PartitionSnapshot
Available on crate feature client
only.
impl Encodable for PartitionSnapshot
client
only.