Repository navigation
remote-derive: support owning string and bytes constructors - #812
Open
rsd-darshan wants to merge 1 commit into
Open
rsd-darshan wants to merge 1 commit into
rsd-darshan wants to merge 1 commit into
Conversation
Add copy_from_str and from_bytes overrides while preserving existing defaults. Route owned byte payloads through the requested constructor and opt into shared input decoding. Cover constructor dispatch, ownership, UTF-8 validation, and existing forwarders with regression tests.
|
All contributors have signed the CLA ✍️ ✅ |
rsd-darshan
marked this pull request as ready for review
October 30, 2026 07:25
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 #630.
Remote string types whose
From<&str>borrows or accepts only static strings could not usederive(ProtoString), and remote bytes wrappers always copied their wire payloads.copy_from_str = pathtoProtoString, using the owning constructor forFrom<&str>,copy_from_str, and UTF-8-validated wire decoding.from_bytes = pathtoProtoBytes, constructing fromWirePayload::into_bytes()and settingPREFERS_OWNED_PAYLOAD = truesoBytes-backed input can share its allocation.as_sharedhook. Document input-buffer retention and add a changelog fragment.Validation:
task lintpasses.task testpasses (4,328 tests passed; 206 ignored).No
buffa-codegenoutput or checked-in generated types change.