pub struct PreEncodedRows;Expand description
Passthrough for records that are already RowBinary-encoded rows
(Vec<u8> payloads): appends the bytes verbatim. For pipelines that
encode upstream or replicate pre-encoded data. One record must be
exactly one encoded row — the framework counts rows by records.
Trait Implementations§
Source§impl Clone for PreEncodedRows
impl Clone for PreEncodedRows
Source§fn clone(&self) -> PreEncodedRows
fn clone(&self) -> PreEncodedRows
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 moreimpl Copy for PreEncodedRows
Source§impl Debug for PreEncodedRows
impl Debug for PreEncodedRows
Source§impl Default for PreEncodedRows
impl Default for PreEncodedRows
Source§fn default() -> PreEncodedRows
fn default() -> PreEncodedRows
Returns the “default value” for a type. Read more
Source§impl RowEncoder<Owned<Vec<u8>>> for PreEncodedRows
impl RowEncoder<Owned<Vec<u8>>> for PreEncodedRows
Source§fn encode<'buf>(
&mut self,
rec: &Record<Vec<u8>>,
buf: &mut BytesMut,
) -> Result<(), SinkError>
fn encode<'buf>( &mut self, rec: &Record<Vec<u8>>, buf: &mut BytesMut, ) -> Result<(), SinkError>
Append
rec’s encoding to buf. Errors are record-level and
subject to the sink stage’s ErrorPolicy — except errors of
ErrorClass::Fatal, which stop
the pipeline regardless of policy (fatal means the encoder itself
is broken, e.g. the row type cannot match the target schema; every
subsequent record would fail identically).Source§fn buffered_bytes(&self) -> usize
fn buffered_bytes(&self) -> usize
Bytes the encoder is holding internally that have not yet been
flushed to a frame. Row formats append directly in
encode and buffer nothing, so the default is 0.
Columnar formats (which must transpose a whole block before any bytes
exist) return the approximate size of the block under assembly; the
terminal stage adds this to the shard buffer length when deciding
whether to seal a chunk, so a columnar block still respects
ChunkConfig::target_bytes.Source§fn finish_chunk(&mut self, buf: &mut BytesMut) -> Result<(), SinkError>
fn finish_chunk(&mut self, buf: &mut BytesMut) -> Result<(), SinkError>
Finalize the pending chunk: flush any internally-buffered rows into
buf as exactly one complete, self-describing wire frame, leaving
the encoder empty and ready for the next chunk. Row formats already
wrote every row in encode, so the default is a
no-op. The terminal stage calls this immediately before it seals each
EncodedChunk — in steady state, on data lulls, and at drain — so a
columnar encoder’s buffered rows are never silently dropped. Read moreAuto Trait Implementations§
impl Freeze for PreEncodedRows
impl RefUnwindSafe for PreEncodedRows
impl Send for PreEncodedRows
impl Sync for PreEncodedRows
impl Unpin for PreEncodedRows
impl UnsafeUnpin for PreEncodedRows
impl UnwindSafe for PreEncodedRows
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