pub trait BitStreamVisitor {
// Required methods
fn should_enter_block(&mut self, block_id: u32) -> bool;
fn did_exit_block(&mut self, block_id: u32);
fn visit(&mut self, block_id: u32, record: Record);
// Provided method
fn validate(&self, _signature: Signature) -> bool { ... }
}Expand description
A visitor which receives callbacks while reading a bitstream.
Required Methods§
Sourcefn should_enter_block(&mut self, block_id: u32) -> bool
fn should_enter_block(&mut self, block_id: u32) -> bool
Called when a new block is encountered. Return true to enter the block
and read its contents, or false to skip it.
Sourcefn did_exit_block(&mut self, block_id: u32)
fn did_exit_block(&mut self, block_id: u32)
Called when a block is exited.