Skip to main content

encode_event_data_into

Function encode_event_data_into 

Source
pub fn encode_event_data_into(
    buf: &mut Vec<u8>,
    events: &[EventParams<'_>],
) -> Range<usize>
Expand description

Encode multiple events directly into a caller-owned buffer as an EventData FlatBuffer.

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

Returns the range start..buf.len() of the EventData bytes within buf.