Skip to main content

try_encode_empty_ring_into

Function try_encode_empty_ring_into 

Source
pub fn try_encode_empty_ring_into(
    slot_count: u32,
    dst: &mut Vec<u8>,
) -> Result<(), ProtocolError>
Expand description

Strictly encode an empty ring buffer into caller-owned storage.

Clears and resizes dst to the exact ring byte length, reusing allocation.

ยงErrors

Returns ProtocolError when the requested ring size overflows host address space.