Trait embedded_io_async::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§
Provided Methods§
sourceasync fn stream_position(&mut self) -> Result<u64, Self::Error>
async fn stream_position(&mut self) -> Result<u64, Self::Error>
Returns the current seek position from the start of the stream.