pub trait Seek {
// Required method
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
// Provided methods
fn rewind(&mut self) -> Result<()> { ... }
fn stream_len(&mut self) -> Result<u64> { ... }
fn stream_position(&mut self) -> Result<u64> { ... }
}
Expand description
A trait for objects that provide the ability to seek withing a stream.
Required Methods§
Provided Methods§
sourcefn rewind(&mut self) -> Result<()>
fn rewind(&mut self) -> Result<()>
Set the current position of the stream to its beginning.
Semantics match std::io::Seek::rewind()
.
sourcefn stream_len(&mut self) -> Result<u64>
fn stream_len(&mut self) -> Result<u64>
Returns the length of the stream.
Semantics match std::io::Seek::stream_len()
.
sourcefn stream_position(&mut self) -> Result<u64>
fn stream_position(&mut self) -> Result<u64>
Returns the current position of the stream.
Semantics match std::io::Seek::stream_position()
.