Trait ord_lmdb_zero::traits::FromLmdbBytes
source · [−]Expand description
Inverts AsLmdbBytes
, producing a reference to a structure inside a
byte array.
Blanket implementations are provided for LmdbRaw
and slices of
LmdbRaw
things.
This is not a general-purpose deserialisation mechanism. There is no
way to use this trait to read values in any format other than how they
are natively represented in memory. The only control is that outright
invalid values can be rejected so as to avoid undefined behaviour from,
eg, constructing &str
s with malformed content. Reading values not in
native format requires extracting the byte slice and using a separate
deserialisation mechanism.