rekordcrate icon indicating copy to clipboard operation
rekordcrate copied to clipboard

Add way to detect unexpected values in fields

Open Holzhaus opened this issue 2 years ago • 1 comments

In the long run, it would be nice if we could have some diagnostics for the Unknown case. This would help catch edge cases of values we don't know.

We need a way to handle partial failure like this. Lots of the other unknown fields aren't arbitrary, but for example just seem to contain a static value most of the time. It would be nice to have a way of (de-)serializing them while still conveying that the contained value was differing from the expected one. This could help tremendously in helping to find databases where the usual assumptions don't apply.

One possible way to deal with this is adding a new method (e.g. checkForUnexpectedData() -> Result<(), Error>) that looks for unexpected data in fields. But that is something for another PR.

Originally posted by @Swiftb0y and @Holzhaus in https://github.com/Holzhaus/rekordcrate/pull/34#discussion_r811085815

Holzhaus avatar Feb 22 '22 20:02 Holzhaus