Trait drone_core::io::Seek [−][src]
The Seek
trait provides a cursor which can be moved within a stream of
bytes asynchronously.
Associated Types
type Error
[src]
The error type returned by Seek::seek
.
Required methods
fn seek(
&'sess mut self,
pos: SeekFrom
) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'sess>>
[src]
&'sess mut self,
pos: SeekFrom
) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'sess>>
Seek to an offset asynchronously, in bytes, in a stream.
A seek beyond the end of a stream is allowed, but behavior is defined by the implementation.
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
.
Errors
Seeking to a negative offset is considered an error.