Expand description
Serialization.
Structs§
- Buf
- A byte slice wrapper providing buffer functionality.
- BufView
- A
BufferView
into aBuf
. - BufView
Mut - A
BufferViewMut
into aBuf
. - Buffer
TooShort Error - The error returned when a buffer is too short to hold a serialized packet,
and the
BufferProvider
is incapable of allocating a new one. - Byte
Slice Inner Packet Builder - An
InnerPacketBuilder
created from anyB: SplitByteSlice
. - Inner
Serializer - A
Serializer
constructed from anInnerPacketBuilder
. - Limited
Size Packet Builder - A
PacketBuilder
which has no header or footer, but which imposes a maximum body length constraint. - Maybe
Reuse Buffer Provider - Provides an implementation of
BufferProvider
from aBufferAlloc
A
that attempts to reuse the input buffer and falls back to the allocator if the input buffer can’t be reused. - Nested
- One object encapsulated in another one.
- NoReuse
Buffer Provider - Provides an implementation of
BufferProvider
from aBufferAlloc
A
that never attempts to reuse the input buffer, and always create a new buffer from the allocatorA
. - Packet
Constraints - The constraints required by a
PacketBuilder
. - Serialize
Target - The target buffers into which
PacketBuilder::serialize
serializes its header and footer. - Truncating
Serializer - A
Serializer
that truncates its body if it would exceed a size limit.
Enums§
- Either
- Either of two buffers.
- Either
Serializer - Either of two serializers.
- Serialize
Error - An error in serializing a packet.
- Truncate
Direction - The direction a buffer’s body should be truncated from to force it to fit within a size limit.
Traits§
- Buffer
Alloc - An object capable of allocating new buffers.
- Buffer
Provider - An object capable of providing buffers which satisfy certain constraints.
- Inner
Packet Builder - A builder capable of serializing packets - which do not encapsulate other packets - into an existing buffer.
- Packet
Builder - A builder capable of serializing a packet’s headers and footers.
- Serializer
Functions§
- new_
buf_ vec - Allocates a new
Buf<Vec<u8>>
. - try_
reuse_ buffer - Attempts to reuse a buffer for the purposes of implementing
BufferProvider::reuse_or_realloc
.