std: Mark timeout methods experimental
This was intended as part of the I/O timeouts commit, but it was mistakenly forgotten. The type of the timeout argument is not guaranteed to remain constant into the future.
This commit is contained in:
@@ -169,6 +169,7 @@ impl TcpStream {
|
|||||||
///
|
///
|
||||||
/// For clarification on the semantics of interrupting a read and a write,
|
/// For clarification on the semantics of interrupting a read and a write,
|
||||||
/// take a look at `set_read_timeout` and `set_write_timeout`.
|
/// take a look at `set_read_timeout` and `set_write_timeout`.
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_timeout(timeout_ms)
|
self.obj.set_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -185,6 +186,7 @@ impl TcpStream {
|
|||||||
/// action is taken. Otherwise, the read operation will be scheduled to
|
/// action is taken. Otherwise, the read operation will be scheduled to
|
||||||
/// promptly return. If a timeout error is returned, then no data was read
|
/// promptly return. If a timeout error is returned, then no data was read
|
||||||
/// during the timeout period.
|
/// during the timeout period.
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_read_timeout(timeout_ms)
|
self.obj.set_read_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,7 @@ impl TcpStream {
|
|||||||
/// does not know how many bytes were written as part of the timeout
|
/// does not know how many bytes were written as part of the timeout
|
||||||
/// operation. It may be the case that bytes continue to be written in an
|
/// operation. It may be the case that bytes continue to be written in an
|
||||||
/// asynchronous fashion after the call to write returns.
|
/// asynchronous fashion after the call to write returns.
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_write_timeout(timeout_ms)
|
self.obj.set_write_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ impl UdpSocket {
|
|||||||
/// Sets the read/write timeout for this socket.
|
/// Sets the read/write timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_timeout(timeout_ms)
|
self.obj.set_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -154,6 +155,7 @@ impl UdpSocket {
|
|||||||
/// Sets the read timeout for this socket.
|
/// Sets the read timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_read_timeout(timeout_ms)
|
self.obj.set_read_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -161,6 +163,7 @@ impl UdpSocket {
|
|||||||
/// Sets the write timeout for this socket.
|
/// Sets the write timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_write_timeout(timeout_ms)
|
self.obj.set_write_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ impl UnixStream {
|
|||||||
/// Sets the read/write timeout for this socket.
|
/// Sets the read/write timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_timeout(timeout_ms)
|
self.obj.set_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -104,6 +105,7 @@ impl UnixStream {
|
|||||||
/// Sets the read timeout for this socket.
|
/// Sets the read timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_read_timeout(timeout_ms)
|
self.obj.set_read_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
@@ -111,6 +113,7 @@ impl UnixStream {
|
|||||||
/// Sets the write timeout for this socket.
|
/// Sets the write timeout for this socket.
|
||||||
///
|
///
|
||||||
/// For more information, see `TcpStream::set_timeout`
|
/// For more information, see `TcpStream::set_timeout`
|
||||||
|
#[experimental = "the timeout argument may change in type and value"]
|
||||||
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
|
||||||
self.obj.set_write_timeout(timeout_ms)
|
self.obj.set_write_timeout(timeout_ms)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user