Skip to content

add Deserialize::validate for non-allocating validation#4493

Open
Centril wants to merge 1 commit intomasterfrom
centril/sats-de-validate
Open

add Deserialize::validate for non-allocating validation#4493
Centril wants to merge 1 commit intomasterfrom
centril/sats-de-validate

Conversation

@Centril
Copy link
Contributor

@Centril Centril commented Feb 27, 2026

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 #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.

@Centril Centril requested a review from coolreader18 February 27, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant