Files
Mazdak Farrokhzad 52872521d4 add Deserialize::validate for non-allocating validation (#4493)
# Description of Changes

Adds `Deserialize::validate` and all the friends necessary to make that
work.
The point of this is to enable allocation-less validation of input in
some data format, in particular BSATN, against some expected type, in
particular an `AlgebraicValue` at an `AlgebraicType`.
This is extracted from
https://github.com/clockworklabs/SpacetimeDB/pull/4311 and is used there
to convert raw BSATN to `BytesKey` without constructing the composite
`AlgebraicValue` just for validation only to throw it away immediately.

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

TODO: tweak existing SATS roundtrip tests to also check validation.

---------

Co-authored-by: Noa <coolreader18@gmail.com>
2026-03-19 20:29:59 +00:00
..