Trait dsi_bitstream::traits::BitSeek
source · pub trait BitSeek {
type Error: Error + Send + Sync + 'static;
// Required methods
fn get_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 get_bit_pos(&mut self) -> Result<u64, Self::Error>
fn get_bit_pos(&mut self) -> Result<u64, Self::Error>
Get the current position in bits from the start of the file.
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 file to bit_pos
.
Note that moving forward by a small amount of bits may be accomplished
more efficiently by calling BitRead::skip_bits
.