`into_std`-like API for `windows::named_pipe::NamedPipe*`
Is your feature request related to a problem? Please describe.
I want to convert a NamedPipeClient/NamedPipeServer instance into a handle I can manipulate manually whose lifetime I control. Most other networking types, like TcpStream, can be converted to the corresponding std type with .into_std() and then into a handle with .into_raw_handle() or through OwnedHandle::from. NamedPipe* doesn't have a corresponding std type, which makes it impossible to obtain an owned handle from it -- only a borrowed one.
Describe the solution you'd like
Some kind of API to obtain an OwnedHandle, mirroring into_std. My first guess would be to implement TryInto<OwnedHandle>, and other networking types could implement it as well for symmetry (supposedly TryInto<OwnedFd> on Unix). The fact that this hasn't happened for other types yet gives me pause, though -- is there any subtlety I'm missing?
Describe alternatives you've considered
Wait for std to introduce named pipe support as well. I don't think any work on that has started on the std side, and in any way I wish we didn't have to wait for the stabilization process to complete before this is usable.
Additional context n/a
Source: tokio-rs/tokio