#[non_exhaustive]pub struct PartitionSnapshot {
pub index: i32,
pub error_code: i16,
pub snapshot_id: SnapshotId,
pub current_leader: LeaderIdAndEpoch,
pub size: i64,
pub position: i64,
pub unaligned_records: Bytes,
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.index: i32
The partition index.
Supported API versions: 0-1
error_code: i16
The error code, or 0 if there was no fetch error.
Supported API versions: 0-1
snapshot_id: SnapshotId
The snapshot endOffset and epoch fetched
Supported API versions: 0-1
current_leader: LeaderIdAndEpoch
Supported API versions: 0-1
size: i64
The total size of the snapshot.
Supported API versions: 0-1
position: i64
The starting byte position within the snapshot included in the Bytes field.
Supported API versions: 0-1
unaligned_records: Bytes
Snapshot data in records format which may not be aligned on an offset boundary
Supported API versions: 0-1
unknown_tagged_fields: BTreeMap<i32, Bytes>
Other tagged fields
Implementations§
Source§impl PartitionSnapshot
impl PartitionSnapshot
Sourcepub fn with_index(self, value: i32) -> Self
pub fn with_index(self, value: i32) -> Self
Sets index
to the passed value.
The partition index.
Supported API versions: 0-1
Sourcepub fn with_error_code(self, value: i16) -> Self
pub fn with_error_code(self, value: i16) -> Self
Sets error_code
to the passed value.
The error code, or 0 if there was no fetch error.
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 fetched
Supported API versions: 0-1
Sourcepub fn with_current_leader(self, value: LeaderIdAndEpoch) -> Self
pub fn with_current_leader(self, value: LeaderIdAndEpoch) -> Self
Sets current_leader
to the passed value.
Supported API versions: 0-1
Sourcepub fn with_size(self, value: i64) -> Self
pub fn with_size(self, value: i64) -> Self
Sets size
to the passed value.
The total size of the snapshot.
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 starting byte position within the snapshot included in the Bytes field.
Supported API versions: 0-1
Sourcepub fn with_unaligned_records(self, value: Bytes) -> Self
pub fn with_unaligned_records(self, value: Bytes) -> Self
Sets unaligned_records
to the passed value.
Snapshot data in records format which may not be aligned on an offset boundary
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 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 client
only.
impl Decodable for PartitionSnapshot
client
only.Source§impl Default for PartitionSnapshot
impl Default for PartitionSnapshot
Source§impl Encodable for PartitionSnapshot
Available on crate feature broker
only.
impl Encodable for PartitionSnapshot
broker
only.