Skip to content

Commit 92dbaf2

Browse files
committed
Re-add an unintentionally removed paragraph
1 parent 45fcad0 commit 92dbaf2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

embedded-io/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ pub trait Read: ErrorType {
318318
/// to become available, before the peer represented by `Read` would stop sending bytes due to
319319
/// application-specific reasons (as in the peer waiting for a response to the data it had sent so far).
320320
///
321+
/// If the reader is at end-of-file (EOF), `Ok(0)` is returned. There is no guarantee that a reader at EOF
322+
/// will always be so in the future, for example a reader can stop being at EOF if another process appends
323+
/// more bytes to the underlying file.
324+
///
321325
/// If `buf.len() == 0`, `read` returns without blocking, with either `Ok(0)` or an error.
322326
/// The `Ok(0)` doesn't indicate EOF, unlike when called with a non-empty buffer.
323327
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>;

0 commit comments

Comments
 (0)