Trait packet::ReusableBuffer
source · pub trait ReusableBuffer: TargetBuffer + ShrinkBuffer { }
Expand description
A byte buffer that can be reused.
ReusableBuffer
is a shorthand for TargetBuffer + ShrinkBuffer
. A
ReusableBuffer
can be serialized into multiple times - the
ShrinkBuffer
implementation allows the buffer’s capacity to be reclaimed
for a new serialization pass.