Skip to main content

finish

Function finish 

Source
pub fn finish(buf: &mut BytesMut, len_pos: usize) -> Result<(), Error>
Expand description

Patches the length field written by begin.

§Errors

Returns Error::Encode when the message body is larger than 2 GiB and cannot be expressed in the protocol’s 32-bit length prefix. Silently truncating would make the server reinterpret the rest of the buffer as new messages.