You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, most methods async_io::Async requires the type it wraps to implement AsRawFd, or AsRawSocket on Windows.
The standard library now supports the safe alternative AsFd (or AsSocket on Windows), and async-io has some support for this. However, it doesn't seem possible to create an Async<T> for a type that implements AsFd but not AsRawFd.
I have types I'd love to use Async with, and I'd like to drop the implementation of AsRawFd for those types. (This would also eliminate unsafe code.)
Please consider adding a constructor for Async<T> where T: AsFd.
The text was updated successfully, but these errors were encountered:
I definitely want to move in this direction, especially since doing this would allow us to make this crate forbid(unsafe_code) and would make things safer to use overall. The best way of doing this is to wait for Debian Bookworm to release and then bump the MSRV of this crate to 1.63.
Currently, most methods
async_io::Async
requires the type it wraps to implementAsRawFd
, orAsRawSocket
on Windows.The standard library now supports the safe alternative
AsFd
(orAsSocket
on Windows), and async-io has some support for this. However, it doesn't seem possible to create anAsync<T>
for a type that implementsAsFd
but notAsRawFd
.I have types I'd love to use
Async
with, and I'd like to drop the implementation ofAsRawFd
for those types. (This would also eliminateunsafe
code.)Please consider adding a constructor for
Async<T>
whereT: AsFd
.The text was updated successfully, but these errors were encountered: