pub struct PartitionData {
pub partition_index: i32,
pub error_code: i16,
pub error_message: Option<KafkaString>,
pub acknowledge_error_code: i16,
pub acknowledge_error_message: Option<KafkaString>,
pub current_leader: LeaderIdAndEpoch,
pub records: Option<Bytes>,
pub acquired_records: Vec<AcquiredRecords>,
pub _unknown_tagged_fields: Vec<RawTaggedField>,
}Fields§
§partition_index: i32The partition index.
error_code: i16The fetch error code, or 0 if there was no fetch error.
error_message: Option<KafkaString>The fetch error message, or null if there was no fetch error.
acknowledge_error_code: i16The acknowledge error code, or 0 if there was no acknowledge error.
acknowledge_error_message: Option<KafkaString>The acknowledge error message, or null if there was no acknowledge error.
current_leader: LeaderIdAndEpochThe current leader of the partition.
records: Option<Bytes>The record data.
acquired_records: Vec<AcquiredRecords>The acquired records.
_unknown_tagged_fields: Vec<RawTaggedField>Implementations§
Source§impl PartitionData
impl PartitionData
pub fn with_partition_index(self, value: i32) -> Self
pub fn with_error_code(self, value: i16) -> Self
pub fn with_error_message(self, value: Option<KafkaString>) -> Self
pub fn with_acknowledge_error_code(self, value: i16) -> Self
pub fn with_acknowledge_error_message(self, value: Option<KafkaString>) -> Self
pub fn with_current_leader(self, value: LeaderIdAndEpoch) -> Self
pub fn with_records(self, value: Option<Bytes>) -> Self
pub fn with_acquired_records(self, value: Vec<AcquiredRecords>) -> 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 PartitionData
impl Clone for PartitionData
Source§fn clone(&self) -> PartitionData
fn clone(&self) -> PartitionData
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 PartitionData
impl Debug for PartitionData
Source§impl Default for PartitionData
impl Default for PartitionData
Source§impl PartialEq for PartitionData
impl PartialEq for PartitionData
Source§fn eq(&self, other: &PartitionData) -> bool
fn eq(&self, other: &PartitionData) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PartitionData
Auto Trait Implementations§
impl !Freeze for PartitionData
impl RefUnwindSafe for PartitionData
impl Send for PartitionData
impl Sync for PartitionData
impl Unpin for PartitionData
impl UnsafeUnpin for PartitionData
impl UnwindSafe for PartitionData
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