Trait esp_idf_svc::io::asynch::Seek

source ·
pub trait Seek: ErrorType {
    // Required method
    async fn seek(&mut self, pos: SeekFrom) -> Result<u64, Self::Error>;

    // Provided methods
    async fn rewind(&mut self) -> Result<(), Self::Error> { ... }
    async fn stream_position(&mut self) -> Result<u64, Self::Error> { ... }
}
Expand description

Async seek within streams.

This trait is the embedded-io-async equivalent of [std::io::Seek].

Required Methods§

source

async fn seek(&mut self, pos: SeekFrom) -> Result<u64, Self::Error>

Seek to an offset, in bytes, in a stream.

Provided Methods§

source

async fn rewind(&mut self) -> Result<(), Self::Error>

Rewind to the beginning of a stream.

source

async fn stream_position(&mut self) -> Result<u64, Self::Error>

Returns the current seek position from the start of the stream.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Seek for &mut T
where T: Seek + ?Sized,

source§

async fn seek( &mut self, pos: SeekFrom, ) -> Result<u64, <&mut T as ErrorType>::Error>

source§

impl<T> Seek for Box<T>
where T: Seek + ?Sized,

source§

async fn seek( &mut self, pos: SeekFrom, ) -> Result<u64, <Box<T> as ErrorType>::Error>

Implementors§