Update docs of futures-mio

This commit is contained in:
Alex Crichton
2016-08-18 10:29:11 -07:00
parent 12a05b9568
commit 0a707ffccb
5 changed files with 103 additions and 16 deletions
+10
View File
@@ -66,11 +66,21 @@ impl UdpSocket {
}
/// Test whether this socket is ready to be read or not.
///
/// If the socket is *not* readable then the current task is scheduled to
/// get a notification when the socket does become readable. That is, this
/// is only suitable for calling in a `Future::poll` method and will
/// automatically handle ensuring a retry once the socket is readable again.
pub fn poll_read(&self) -> Poll<(), io::Error> {
self.ready.poll_read()
}
/// Test whether this socket is writey to be written to or not.
///
/// If the socket is *not* writable then the current task is scheduled to
/// get a notification when the socket does become writable. That is, this
/// is only suitable for calling in a `Future::poll` method and will
/// automatically handle ensuring a retry once the socket is writable again.
pub fn poll_write(&self) -> Poll<(), io::Error> {
self.ready.poll_write()
}