-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Update the documentation for {As,Into,From}Raw{Fd,Handle,Socket}
.
#93562
Merged
Commits on Feb 1, 2022
-
Update the documentation for
{As,Into,From}Raw{Fd,Handle,Socket}
.This change weakens the descriptions of the `{as,into,from}_raw_{fd,handle,socket}` descriptions from saying that they *do* express ownership relations to say that they are *typically used* in ways that express ownership relations. This needed needed since, for example, std's own [`RawFd`] implements `{As,From,Into}Fd` without any of the ownership relationships. This adds proper `# Safety` comments to `from_raw_{fd,handle,socket}`, adds the requirement that raw handles be not opened with the `FILE_FLAG_OVERLAPPED` flag, and merges the `OwnedHandle::from_raw_handle` comment into the main `FromRawHandle::from_raw_handle` comment. And, this changes `HandleOrNull` and `HandleOrInvalid` to not implement `FromRawHandle`, since they are intended for limited use in FFI situations, and not for generic use, and they have constraints that are stronger than the those of `FromRawHandle`. [`RawFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/type.RawFd.html
Configuration menu - View commit details
-
Copy full SHA for ca42a1b - Browse repository at this point
Copy the full SHA ca42a1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 713bb19 - Browse repository at this point
Copy the full SHA 713bb19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8516895 - Browse repository at this point
Copy the full SHA 8516895View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ef7ee3 - Browse repository at this point
Copy the full SHA 6ef7ee3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89544e9 - Browse repository at this point
Copy the full SHA 89544e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 656d2a3 - Browse repository at this point
Copy the full SHA 656d2a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f88fb2a - Browse repository at this point
Copy the full SHA f88fb2aView commit details
Commits on Feb 3, 2022
-
Remove the documentation comment for
OwnedSocket::from_raw_socket
.This function is documented in more detail in the `FromRawSocket` trait.
Configuration menu - View commit details
-
Copy full SHA for ba6050f - Browse repository at this point
Copy the full SHA ba6050fView commit details
Commits on Mar 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for af642bb - Browse repository at this point
Copy the full SHA af642bbView commit details
Commits on Mar 3, 2022
-
Remove the comment about
FILE_FLAG_OVERLAPPED
.There may eventually be something to say about `FILE_FLAG_OVERLAPPED` here, however this appears to be independent of the other changes in this PR, so remove them from this PR so that it can be discussed separately.
Configuration menu - View commit details
-
Copy full SHA for 8253cfe - Browse repository at this point
Copy the full SHA 8253cfeView commit details
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.