pub enum FetchWriteOp {
Inline(Bytes),
Records(RecordsPayload),
}Expand description
One ordered segment of a FetchResponse write-plan.
The broker drains these in order: Inline bytes are written from
userspace; a Records segment carries the partition’s records payload,
which the broker resolves to a vectored write_all (any payload kind) or
— on Linux plaintext for RecordsPayload::FileRegions — a sendfile.
The Records op holds the RecordsPayload itself (a cheap refcounted
clone for Raw/FileRegions) rather than pre-encoded bytes so the broker
can choose its drain strategy. The records length prefix (INT32 for
non-flex, unsigned-varint for flex) is part of the preceding Inline
segment, exactly as the wire format requires; Records is the raw payload
region only.
Variants§
Inline(Bytes)
Userspace bytes — response header fragment, partition metadata, records length prefixes, tagged-field trailers, array prefixes, etc.
Records(RecordsPayload)
A partition’s records payload region (no length prefix). Drained by the broker via vectored write or sendfile.
Implementations§
Trait Implementations§
Source§impl Clone for FetchWriteOp
impl Clone for FetchWriteOp
Source§fn clone(&self) -> FetchWriteOp
fn clone(&self) -> FetchWriteOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more