feat(gax): add mutable extension accessors to RequestOptions - #6254
Open
olavloite wants to merge 1 commit into
Open
feat(gax): add mutable extension accessors to RequestOptions#6254olavloite wants to merge 1 commit into
olavloite wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request bumps the version of google-cloud-gax to 1.14.0 and adds get_extension_mut and get_extension_or_default_mut methods to RequestOptions to support mutable extension retrieval. The review feedback correctly points out that the Clone trait bound on get_extension_or_default_mut is unnecessary because the default value is inserted directly by value, and removing it would make the API more flexible.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6254 +/- ##
=======================================
Coverage 96.07% 96.07%
=======================================
Files 275 275
Lines 68829 68860 +31
=======================================
+ Hits 66126 66160 +34
+ Misses 2703 2700 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add `get_extension_mut` and `get_extension_or_default_mut` to the `RequestOptionsExt` trait and implement them for `RequestOptions`. These methods allow client library layers to mutate request option extensions in place (such as injecting or updating headers in an existing `HeaderMap`) without needing to clone or re-insert the extension.
olavloite
force-pushed
the
gax-mutable-extension-accessors
branch
from
August 1, 2026 10:19
615ee69 to
01be876
Compare
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.
Add
get_extension_mutandget_extension_or_default_mutto theRequestOptionsExttrait and implement them forRequestOptions.These methods allow client library layers to mutate request option extensions in place (such as injecting or updating headers in an existing
HeaderMap) without needing to clone or re-insert the extension.