Skip to main content

encode_control

Function encode_control 

Source
pub fn encode_control(
    sender: NodeId,
    session: LinkSessionId,
    message: Control,
    output: &mut [u8],
) -> Result<ControlEncoding, WireError>
Expand description

Encode control metadata into caller-owned storage without allocating.

Invalid fields or insufficient capacity leave the output unchanged. Callers may send only messages actually authorized by the current consensus role.