Expand description
ModulesΒ§
MacrosΒ§
- impl_
for_ πarrays - impl_
for_ πprimitive - impl_
for_ πtuple - impl_
poke_ πfor_ deref
TraitsΒ§
- Peek
- A trait for values that provide deserialization from buffers of bytes.
- Poke
- A trait for values that provide serialization into buffers of bytes.
FunctionsΒ§
- ensure_
red_ zone - Add
T::max_size()βred zoneβ (padding of zeroes) to the end of the vec ofbytes. This allows deserialization to assert that at leastT::max_size()bytes exist at all times. - peek_
from_ βdefault - Peek helper for constructing a
TbyDefaultinitialized stack allocation. - peek_
from_ slice - Peek inplace a
Tfrom a slice of bytes, returning a slice of the remaining bytes.srcmust contain at leastT::max_size()bytes. - peek_
from_ βuninit - Peek helper for constructing a
TbyCopying into an uninitialized stack allocation. - poke_
extend_ vec - poke_
inplace_ slice - Poke helper to insert a serialized version of
srcat the beginning fordst. - poke_
into_ vec - Poke helper to append a serialized version of
srcto the end ofdst. - read_
verbatim π β - strip_
red_ zone - Remove the βred zoneβ (padding of zeroes) from the end of the vec of
bytes. This is effectively the inverse ofensure_red_zone, with the caveat that space reserved for the red zone is not un-reserved. Callers are repsonsible for making sure the vec actually has a red zone, otherwise data bytes can get stripped instead. - write_
verbatim π β
UnionsΒ§
- Maybe
Uninit πShim