about summary refs log tree commit diff
path: root/src/libstd/io/error.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-30 05:59:49 +0000
committerbors <bors@rust-lang.org>2015-08-30 05:59:49 +0000
commit4bb90232daab451cf58359e0c5874bc905d2f101 (patch)
tree3c58214650cd1c8c3cee6575d6ac2cb59cbdcf2e /src/libstd/io/error.rs
parent2f749254cafd4940243548730afc02c5410611bf (diff)
parent73e7a7269553f661501d54c1fe8c57aa12b126fa (diff)
downloadrust-4bb90232daab451cf58359e0c5874bc905d2f101.tar.gz
rust-4bb90232daab451cf58359e0c5874bc905d2f101.zip
Auto merge of #27588 - cesarb:read_all, r=alexcrichton
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980).

Tracking issue: https://github.com/rust-lang/rust/issues/27585
Diffstat (limited to 'src/libstd/io/error.rs')
-rw-r--r--src/libstd/io/error.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs
index eb39a836c43..d161b625068 100644
--- a/src/libstd/io/error.rs
+++ b/src/libstd/io/error.rs
@@ -150,6 +150,15 @@ pub enum ErrorKind {
     #[stable(feature = "rust1", since = "1.0.0")]
     Other,
 
+    /// An error returned when an operation could not be completed because an
+    /// "end of file" was reached prematurely.
+    ///
+    /// This typically means that an operation could only succeed if it read a
+    /// particular number of bytes but only a smaller number of bytes could be
+    /// read.
+    #[unstable(feature = "read_exact", reason = "recently added", issue = "27585")]
+    UnexpectedEOF,
+
     /// Any I/O error not part of this list.
     #[unstable(feature = "io_error_internals",
                reason = "better expressed through extensible enums that this \