diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-09-10 13:26:44 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-09-11 09:48:48 -0700 |
| commit | f0b1326dc79e186f89b65336ae85f3a8ac6db4c1 (patch) | |
| tree | ff6de4dd0d69fcc28ee326582693a46a2f0070bc /src/libstd/net | |
| parent | 79c6a4d55cfcce0cd3512b162b78dbd1497acea3 (diff) | |
| download | rust-f0b1326dc79e186f89b65336ae85f3a8ac6db4c1.tar.gz rust-f0b1326dc79e186f89b65336ae85f3a8ac6db4c1.zip | |
std: Stabilize/deprecate features for 1.4
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
Diffstat (limited to 'src/libstd/net')
| -rw-r--r-- | src/libstd/net/tcp.rs | 24 | ||||
| -rw-r--r-- | src/libstd/net/udp.rs | 24 |
2 files changed, 32 insertions, 16 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 5467a8575ff..d563ba0b620 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -130,8 +130,13 @@ impl TcpStream { /// If the value specified is `None`, then `read` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + /// + /// # Note + /// + /// Platforms may return a different error code whenever a read times out as + /// a result of setting this option. For example Unix typically returns an + /// error of the kind `WouldBlock`, but Windows may return `TimedOut`. + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> { self.0.set_read_timeout(dur) } @@ -141,8 +146,13 @@ impl TcpStream { /// If the value specified is `None`, then `write` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + /// + /// # Note + /// + /// Platforms may return a different error code whenever a write times out + /// as a result of setting this option. For example Unix typically returns + /// an error of the kind `WouldBlock`, but Windows may return `TimedOut`. + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> { self.0.set_write_timeout(dur) } @@ -154,8 +164,7 @@ impl TcpStream { /// # Note /// /// Some platforms do not provide access to the current timeout. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn read_timeout(&self) -> io::Result<Option<Duration>> { self.0.read_timeout() } @@ -167,8 +176,7 @@ impl TcpStream { /// # Note /// /// Some platforms do not provide access to the current timeout. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn write_timeout(&self) -> io::Result<Option<Duration>> { self.0.write_timeout() } diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index dcb76161d1f..74c4416b35b 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -97,8 +97,13 @@ impl UdpSocket { /// If the value specified is `None`, then `read` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + /// + /// # Note + /// + /// Platforms may return a different error code whenever a read times out as + /// a result of setting this option. For example Unix typically returns an + /// error of the kind `WouldBlock`, but Windows may return `TimedOut`. + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> { self.0.set_read_timeout(dur) } @@ -108,8 +113,13 @@ impl UdpSocket { /// If the value specified is `None`, then `write` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + /// + /// # Note + /// + /// Platforms may return a different error code whenever a write times out + /// as a result of setting this option. For example Unix typically returns + /// an error of the kind `WouldBlock`, but Windows may return `TimedOut`. + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> { self.0.set_write_timeout(dur) } @@ -117,8 +127,7 @@ impl UdpSocket { /// Returns the read timeout of this socket. /// /// If the timeout is `None`, then `read` calls will block indefinitely. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn read_timeout(&self) -> io::Result<Option<Duration>> { self.0.read_timeout() } @@ -126,8 +135,7 @@ impl UdpSocket { /// Returns the write timeout of this socket. /// /// If the timeout is `None`, then `write` calls will block indefinitely. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", - issue = "27773")] + #[stable(feature = "socket_timeout", since = "1.4.0")] pub fn write_timeout(&self) -> io::Result<Option<Duration>> { self.0.write_timeout() } |
