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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.