pub trait Skip {
// Required methods
fn skip(&mut self, amount: u64) -> Result<(), Error>;
fn stream_position(&mut self) -> Result<u64, Error>;
fn stream_len(&mut self) -> Result<u64, Error>;
}
Expand description
A subset of the [Seek
] trait, providing a cursor which can skip forward within a stream of bytes.
Required Methods§
sourcefn skip(&mut self, amount: u64) -> Result<(), Error>
fn skip(&mut self, amount: u64) -> Result<(), Error>
Skip an amount of bytes in a stream.
A skip beyond the end of a stream is allowed, but behavior is defined by the implementation.
sourcefn stream_position(&mut self) -> Result<u64, Error>
fn stream_position(&mut self) -> Result<u64, Error>
Returns the current position of the cursor from the start of the stream.
sourcefn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
Returns the length of this stream, in bytes.