std: Deprecate the std::old_io::net primitives
The `std::net` primitives should be ready for use now and as a result the old ones are now deprecated and slated for removal. Most TCP/UDP functionality is now available through `std::net` but the `std::old_io::net::pipe` module is removed entirely from the standard library. Unix socket funtionality can be found in sfackler's [`unix_socket`][unix] crate and there is currently no replacement for named pipes on Windows. [unix]: https://crates.io/crates/unix_socket [breaking-change]
This commit is contained in:
parent
b0746ff19b
commit
9aea749b83
7 changed files with 30 additions and 0 deletions
|
@ -73,42 +73,49 @@ impl AsRawFd for old_io::pipe::PipeStream {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::pipe::UnixStream {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::pipe::UnixListener {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::pipe::UnixAcceptor {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::tcp::TcpStream {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::tcp::TcpListener {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::tcp::TcpAcceptor {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
impl AsRawFd for old_io::net::udp::UdpSocket {
|
||||
fn as_raw_fd(&self) -> Fd {
|
||||
self.as_inner().fd()
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(deprecated)]
|
||||
|
||||
use prelude::v1::*;
|
||||
|
||||
use old_io::net::ip;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue