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>;
}
Required Associated Types§
Required Methods§
Sourcefn bit_pos(&mut self) -> Result<u64, Self::Error>
fn bit_pos(&mut self) -> Result<u64, Self::Error>
Get the current position in bits from the start of the stream.
Sourcefn set_bit_pos(&mut self, bit_pos: u64) -> Result<(), Self::Error>
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
.