Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions tokio/src/io/async_seek.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ pub trait AsyncSeek {

/// Waits for a seek operation to complete.
///
/// If the seek operation completed successfully,
/// this method returns the new position from the start of the stream.
/// That position can be used later with [`SeekFrom::Start`]. Repeatedly
/// calling this function without calling `start_seek` might return the
/// same result.
/// If the seek operation completed successfully, this method returns the
/// new position from the start of the stream. That position can be used
/// later with [`SeekFrom::Start`].
///
/// The position returned by calling this method can only be relied on right
/// after `start_seek`. If you have changed the position by e.g. reading or
/// writing since calling `start_seek`, then it is unspecified whether the
/// returned position takes that position change into account. Similarly, if
/// `start_seek` has never been called, then it is unspecified whether
/// `poll_complete` returns the actual position or some other placeholder
/// value (such as 0).
///
/// # Errors
///
Expand Down