mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
io: clarify behavior of seeking when start_seek
is not used (#7366)
This commit is contained in:
parent
4380de9fe9
commit
328bd049f6
@ -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
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user