Skip to content

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

Open
Centril wants to merge 7 commits intomasterfrom
centril/sats-de-validate
Open

add Deserialize::validate for non-allocating validation#4493
Centril wants to merge 7 commits 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
Copy link
Contributor

@Shubham8287 Shubham8287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good!

@Centril Centril force-pushed the centril/sats-de-validate branch from 0e93ffc to ccf8be0 Compare March 3, 2026 17:58
@Centril Centril enabled auto-merge March 3, 2026 17:58
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.

3 participants