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: Option<Bytes>,
pub _unknown_tagged_fields: Vec<RawTaggedField>,
}Fields§
§index: i32The partition index.
error_code: i16The error code, or 0 if there was no fetch error.
snapshot_id: SnapshotIdThe snapshot endOffset and epoch fetched.
current_leader: LeaderIdAndEpochThe leader of the partition at the time of the snapshot.
size: i64The total size of the snapshot.
position: i64The starting byte position within the snapshot included in the Bytes field.
unaligned_records: Option<Bytes>Snapshot data in records format which may not be aligned on an offset boundary.
_unknown_tagged_fields: Vec<RawTaggedField>Implementations§
Source§impl PartitionSnapshot
impl PartitionSnapshot
pub fn with_index(self, value: i32) -> Self
pub fn with_error_code(self, value: i16) -> Self
pub fn with_snapshot_id(self, value: SnapshotId) -> Self
pub fn with_current_leader(self, value: LeaderIdAndEpoch) -> Self
pub fn with_size(self, value: i64) -> Self
pub fn with_position(self, value: i64) -> Self
pub fn with_unaligned_records(self, value: Option<Bytes>) -> Self
pub fn read(buf: &mut Bytes, version: i16) -> Result<Self>
pub fn write(&self, buf: &mut BytesMut, version: i16) -> Result<()>
pub fn encoded_len(&self, version: i16) -> Result<usize>
Trait Implementations§
Source§impl Clone for PartitionSnapshot
impl Clone for PartitionSnapshot
Source§fn clone(&self) -> PartitionSnapshot
fn clone(&self) -> PartitionSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartitionSnapshot
impl Debug for PartitionSnapshot
Source§impl Default for PartitionSnapshot
impl Default for PartitionSnapshot
Source§impl PartialEq for PartitionSnapshot
impl PartialEq for PartitionSnapshot
Source§fn eq(&self, other: &PartitionSnapshot) -> bool
fn eq(&self, other: &PartitionSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PartitionSnapshot
Auto Trait Implementations§
impl !Freeze for PartitionSnapshot
impl RefUnwindSafe for PartitionSnapshot
impl Send for PartitionSnapshot
impl Sync for PartitionSnapshot
impl Unpin for PartitionSnapshot
impl UnsafeUnpin for PartitionSnapshot
impl UnwindSafe for PartitionSnapshot
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
Mutably borrows from an owned value. Read more