[][src]Trait drone_core::io::Seek

pub trait Seek<'sess> {
    type Error;
    pub fn seek(
        &'sess mut self,
        pos: SeekFrom
    ) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'sess>>; }

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.

Loading content...

Required methods

pub fn seek(
    &'sess mut self,
    pos: SeekFrom
) -> Pin<Box<dyn Future<Output = Result<u64, Self::Error>> + Send + 'sess>>
[src]

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.

Loading content...

Implementors

Loading content...