-
Notifications
You must be signed in to change notification settings - Fork 16
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 I/O-safe traits #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Depending on how the standard library implements them, if we cannot provide the same behavior, I prefer not to do this since we are not providing the same API anyway. |
Can we just bump up the major version with the latest MSRV? |
Rewritten to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
Published in 1.7.0. |
This PR adds a new feature,
io_safety
, which requires Rust 1.63. With this feature, the types in this crate implementAsFd/AsSocket
andTryFrom<OwnedFd/OwnedSocket>
.See also: sunfishcode/io-lifetimes#38
Should I also implement
TryInto<OwnedFd/OwnedSocket>
on these types? It would involve unwrapping theArc
, which doesn't feel idiomatic, but it would complete the symmetry withstd
.