Skip to main content

encode_log_data_into

Function encode_log_data_into 

Source
pub fn encode_log_data_into(
    buf: &mut Vec<u8>,
    logs: &[LogEntryParams<'_>],
) -> Range<usize>
Expand description

Encode multiple log entries directly into a caller-owned buffer as a LogData FlatBuffer.

Zero-copy: writes the header first with reserved offset slots, then encodes entries directly in their final position. No intermediate allocations or copies. The caller can reuse buf across flushes via buf.clear().