Skip to main content

parse_block

Function parse_block 

Source
pub fn parse_block<F>(
    stream: &StreamMetadata,
    payload: &BlockPayload,
    fun: F,
) -> Result<bool, Error>
where F: for<'a> FnMut(Value<'a>) -> Result<bool, Error>,
Expand description

Parses a block of telemetry data, calling a function for each object in the block.

Each parsed Value borrows from a per-block bump arena (and the decompressed buffers) that live only for the duration of this call. The higher-ranked FnMut(Value<'_>) bound forbids the callback from retaining a Value beyond its invocation — anything that must outlive the block (e.g. an Arrow append) must copy out inside the callback.