Trait embedded_io::blocking::Seek

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

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

Blocking seek within streams.

Semantics are the same as [std::io::Seek], check its documentation for details.

Required Methods§

source

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

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

Provided Methods§

source

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

Rewind to the beginning of a stream.

source

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

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

Implementations on Foreign Types§

source§

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

source§

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

source§

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

Available on crate features std or alloc only.
source§

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

Implementors§