pub trait SeekToPoint {
    // Required method
    fn seek_point(&mut self, position: SeekFrom) -> Result<usize>;

    // Provided methods
    fn point_index(&mut self) -> Result<usize> { ... }
    fn point_count(&mut self) -> Result<usize> { ... }
}
Expand description

Base trait for all readers and writers that support seeking to a specific point in their underlying stream. This trait is similar to std::io::Seek but instead of seeking to a specific byte offset, it allows seeking to a specific point.

Required Methods§

source

fn seek_point(&mut self, position: SeekFrom) -> Result<usize>

Seek to the point at the given position in the underlying stream.

If the seek operation completed successfully, this method returns the new point position from the start of the underlying stream.

Provided Methods§

source

fn point_index(&mut self) -> Result<usize>

Returns the index of the current point in the underlying stream. This is equivalent to calling seek_point(SeekFrom::Current(0)).

source

fn point_count(&mut self) -> Result<usize>

Returns the total number of points in the underlying stream.

Implementors§