hylarana_transport

Function with_capacity

Source
pub fn with_capacity(size: usize) -> BytesMut
Expand description

Create a BytesMut and initialize it according to the capacity. The created buffer contains the initialization message header required for message encoding, which is an optimization to reduce data copying in the process.