Trait BitSeek

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

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

Seekability for BitRead and BitWrite streams.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

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

Get the current position in bits from the start of the stream.

Source

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

Set the current position in bits from the start of the stream to bit_pos.

Note that moving forward by a small amount of bits may be accomplished more efficiently by calling BitRead::skip_bits.

Implementors§

Source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E> + WordSeek<Error = E>, RP: ReadParams> BitSeek for BufBitReader<BE, WR, RP>
where WR::Word: DoubleType,

Source§

type Error = <WR as WordSeek>::Error

Source§

impl<E: Error + Send + Sync + 'static, WR: WordRead<Error = E> + WordSeek<Error = E>, RP: ReadParams> BitSeek for BufBitReader<LE, WR, RP>
where WR::Word: DoubleType,

Source§

type Error = <WR as WordSeek>::Error

Source§

impl<E: Endianness, BR: BitRead<E> + BitSeek, const PRINT: bool> BitSeek for CountBitReader<E, BR, PRINT>

Source§

type Error = <BR as BitSeek>::Error

Source§

impl<E: Endianness, BR: BitWrite<E> + BitSeek, const PRINT: bool> BitSeek for CountBitWriter<E, BR, PRINT>

Source§

type Error = <BR as BitSeek>::Error

Source§

impl<WR: WordSeek, RP: ReadParams> BitSeek for BitReader<BE, WR, RP>

Source§

impl<WR: WordSeek, RP: ReadParams> BitSeek for BitReader<LE, WR, RP>