AsyncSeekWith

Trait AsyncSeekWith 

Source
pub trait AsyncSeekWith<'a> {
    type SeekFuture: CompletionFuture<Output = Result<u64>>;

    // Required method
    fn seek(&'a mut self, pos: SeekFrom) -> Self::SeekFuture;
}
Expand description

A cursor which can be moved within a stream of bytes with a specific lifetime.

Required Associated Types§

Source

type SeekFuture: CompletionFuture<Output = Result<u64>>

Future that seeks to an offset a stream. If successful, resolves to the new position from the start of the stream.

Required Methods§

Source

fn seek(&'a mut self, pos: SeekFrom) -> Self::SeekFuture

Seek to an offset in bytes in a stream.

Implementations on Foreign Types§

Source§

impl<'a> AsyncSeekWith<'a> for Empty

Source§

type SeekFuture = Ready<Result<u64, Error>>

Source§

fn seek(&'a mut self, _pos: SeekFrom) -> Self::SeekFuture

Source§

impl<'a, S: AsyncSeekWith<'a> + ?Sized> AsyncSeekWith<'a> for &mut S

Source§

type SeekFuture = <S as AsyncSeekWith<'a>>::SeekFuture

Source§

fn seek(&'a mut self, pos: SeekFrom) -> Self::SeekFuture

Source§

impl<'a, S: AsyncSeekWith<'a> + ?Sized> AsyncSeekWith<'a> for Box<S>

Source§

type SeekFuture = <S as AsyncSeekWith<'a>>::SeekFuture

Source§

fn seek(&'a mut self, pos: SeekFrom) -> Self::SeekFuture

Source§

impl<'a, T: AsRef<[u8]>> AsyncSeekWith<'a> for Cursor<T>

Source§

type SeekFuture = SeekCursor<'a, T>

Source§

fn seek(&'a mut self, pos: SeekFrom) -> Self::SeekFuture

Implementors§