#[non_exhaustive]pub struct FetchPartition {
pub partition: i32,
pub current_leader_epoch: i32,
pub fetch_offset: i64,
pub last_fetched_epoch: i32,
pub log_start_offset: i64,
pub partition_max_bytes: i32,
pub replica_directory_id: Option<[u8; 16]>,
pub high_watermark: Option<i64>,
pub unknown_tagged_fields: Vec<RawTaggedField>,
}Expand description
FetchPartition (nested in FetchRequest).
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: i32The partition index.
current_leader_epoch: i32The current leader epoch of the partition.
fetch_offset: i64The message offset.
last_fetched_epoch: i32The epoch of the last fetched record or -1 if there is none.
log_start_offset: i64The earliest available offset of the follower replica. The field is only used when the request is sent by the follower.
partition_max_bytes: i32The maximum bytes to fetch from this partition. See KIP-74 for cases where this limit may not be honored.
replica_directory_id: Option<[u8; 16]>The directory id of the follower fetching.
(Tagged field 0; None = absent on the wire.)
high_watermark: Option<i64>The high-watermark known by the replica. -1 if the high-watermark is not known and 9223372036854775807 if the feature is not supported.
(Tagged field 1; None = absent on the wire.)
unknown_tagged_fields: Vec<RawTaggedField>Tagged fields not (yet) known to this crate, kept raw.
Implementations§
Source§impl FetchPartition
impl FetchPartition
Sourcepub fn encode(
&self,
buf: &mut impl BufMut,
version: i16,
) -> Result<(), EncodeError>
pub fn encode( &self, buf: &mut impl BufMut, version: i16, ) -> Result<(), EncodeError>
Encode this FetchPartition at version.
Sourcepub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
pub fn decode(buf: &mut impl Buf, version: i16) -> Result<Self, DecodeError>
Decode one FetchPartition, bounding allocation by the default
Limits derived from buf’s remaining length.
Sourcepub fn decode_with_limits(
buf: &mut impl Buf,
version: i16,
limits: Limits,
) -> Result<Self, DecodeError>
pub fn decode_with_limits( buf: &mut impl Buf, version: i16, limits: Limits, ) -> Result<Self, DecodeError>
Decode one FetchPartition under limits.
Sourcepub fn decode_with_budget(
buf: &mut impl Buf,
version: i16,
budget: &mut Budget,
) -> Result<Self, DecodeError>
pub fn decode_with_budget( buf: &mut impl Buf, version: i16, budget: &mut Budget, ) -> Result<Self, DecodeError>
Decode one FetchPartition against an existing budget.