-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setter methods to SocketAddr{,V4,V6}
#31083
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
We probably want to add |
|
All 3 of these lines are too long because of @alexcrichton Do you want all setters in this PR, or is that something for later? |
I'd personally prefer to have all the setters in this PR, but oops I forgot to tag this with |
The libs team discussed this during triage today and the conclusion was that this is functionality that seems good to have to us. @SimonSapin could you update with setters for the other fields (e.g. ip, flowinfo, etc) and also with a tracking issue? |
As demonstrated in the `resolve_socket_addr` change, this is less awkward than re-creating a new address from the other parts.
SocketAddr{,V4,V6}::set_port
.SocketAddr{,V4,V6}
@alexcrichton done. The only thing of note is that when |
I thought this was not worth mentioning in the doc-comment since |
Thanks @SimonSapin! These are exactly the semantics I was expecting to have :) |
As demonstrated in the `resolve_socket_addr` change, this is less awkward than re-creating a new address from the other parts. If this is to be accepted, pleas open a tracking issue (I can’t set the appropriate tags) and I’ll update the PR with the tracking issue number.
As demonstrated in the
resolve_socket_addr
change, this is less awkward than re-creating a new address from the other parts.If this is to be accepted, pleas open a tracking issue (I can’t set the appropriate tags) and I’ll update the PR with the tracking issue number.