Skip to main content

encode

Function encode 

Source
pub fn encode(
    frame: &ParticipantFrame,
    output: &mut [u8],
) -> Result<usize, CodecError>
Expand description

Encodes one complete participant frame into caller-provided storage.

The generic header, v1.0 structural prefix, and selected body are emitted in network byte order. Client requests and pushed values encode without allocation; semantic server values use one temporary exact-body buffer.

§Errors

Returns CodecError::OutputTooSmall when output is shorter than encoded_len, or propagates a selected body’s length/domain error.