Repository navigation
Add checked Value::frame_len without allocating a serialized frame - #29
Open
Johny-Ivory wants to merge 1 commit into
Open
Johny-Ivory wants to merge 1 commit into
Johny-Ivory wants to merge 1 commit into
Conversation
Patch authored by Stevey; submitted by Johny.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28.
Adds
Value::frame_len() -> Result<usize>: the native payload size plus the bindgen-generated IPC header size, without allocating the serialized frame buffer. Conversions and addition are checked; non-positive native sizes and deferred/lazy values return errors.The native sizing function and header use the existing deliberate-exception mechanism already used for serialization. No copied header layout or private-value-layout cast is introduced. Serialization and journal formats are unchanged.
The patch was written by Stevey and is submitted with his permission; I reviewed and tested it and am submitting under my public identity.
Validation on Rust 1.92 with this repository's pinned vendored core (
0aa2d6af) and rayforce-q (69b42105):cargo fmt --all -- --check: passed.cargo test --offline --locked -p rayforce --test serde -- --test-threads=1: 8 passed.This is focused serialization-test coverage, not a complete test-suite run or a measured speedup claim. API naming and error semantics are open to maintainer review.