Skip to main content

encode_request_into

Function encode_request_into 

Source
pub fn encode_request_into<M: Method>(
    value: &M::Request,
    bytes: &mut Vec<u8>,
) -> Result<(), Error>
Expand description

Encode a request into reusable scratch storage, replacing its contents.

Successful calls retain capacity, which may exceed this method’s allowance; the encoded length remains bounded. Errors leave the buffer empty and may discard its allocation. Keep independent immutable bytes for exact retries.