WordSeek

Trait WordSeek 

Source
pub trait WordSeek {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn word_pos(&mut self) -> Result<u64, Self::Error>;
    fn set_word_pos(&mut self, word_pos: u64) -> Result<(), Self::Error>;
}
Expand description

Seekability for WordRead and WordWrite streams.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

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

Get the current position in words from the start of the file.

Source

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

Set the current position in words from the start of the file to word_pos.

Implementors§

Source§

impl<W: UnsignedInt + ToBytes + FromBytes + FiniteRangeNumber, B: Seek> WordSeek for WordAdapter<W, B>

Source§

impl<W: Word, B: AsMut<Vec<W>> + AsRef<Vec<W>>> WordSeek for MemWordWriterVec<W, B>

Available on crate feature alloc only.
Source§

impl<W: Word, B: AsRef<[W]> + AsMut<[W]>> WordSeek for MemWordWriterSlice<W, B>

Source§

impl<W: Word, B: AsRef<[W]>> WordSeek for MemWordReader<W, B, false>

Source§

impl<W: Word, B: AsRef<[W]>> WordSeek for MemWordReader<W, B, true>