pub trait BytesSeek {
    fn position(&self) -> usize;
    fn try_seek(&mut self, pos: usize) -> Result<(), SeekError>;

    fn seek(&mut self, pos: usize) { ... }
    fn try_advance(&mut self, adv: usize) -> Result<(), SeekError> { ... }
    fn advance(&mut self, adv: usize) { ... }
}
Expand description

Sets the internal position for writing or reading.

Required Methods

Returns the internal position.

Sets the internal position if possible.

Provided Methods

Sets the internal position.

Advances the internal position if possible.

Advances the internal position.

Panic

May panic depending on the BytesSeek::seek implementation.

Implementors