io::Seek: Mention that seeking can fail due to buffer flush fail

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
Ian Jackson 2021-05-10 12:56:35 +01:00
parent 2fb1dee14b
commit 74e0e45f3c

View File

@ -1663,6 +1663,8 @@ pub trait Seek {
///
/// # Errors
///
/// Seeking can fail, for example becaue it might involve flushing a buffer.
///
/// Seeking to a negative offset is considered an error.
#[stable(feature = "rust1", since = "1.0.0")]
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;