Expand description
APIs for producing and using archived data.
§Accessing byte slices
The safety requirements for accessing a byte slice will often state that a byte slice must “represent a valid archived type”. The specific validity requirements may vary widely depending on the types being accessed, and so in general the only way to guarantee that this call is safe is to have previously validated the byte slice.
Using techniques such as cryptographic signing can provide a more performant way to verify data integrity from trusted sources.
It is generally safe to assume that unchanged and properly-aligned serialized bytes are always safe to access without validation. By contrast, bytes from a potentially-malicious source should always be validated prior to access.
Modules§
- high
alloc
APIs for environments where allocations can be made. - APIs for environments where allocations cannot be made.
Functions§
- Access a byte slice with a given root position.
- Mutably access a byte slice with a given root position.
- access_
pos_ with_ context bytecheck
Access a byte slice with a given root position and context. - Access a byte slice.
- Mutably access a byte slice.
- access_
with_ context bytecheck
Access a byte slice with a given context. - check_
pos_ with_ context bytecheck
Check a byte slice with a given root position and context. - Deserialize a value using the given deserializer.
- Return the position of the root within a buffer of
length
bytes. - Serialize a value using the given serializer.