pub trait CustomBinaryView: BinaryViewBase {
// Required method
fn initialize(&mut self, view: &BinaryView) -> bool;
// Provided method
fn on_after_snapshot_data_applied(&mut self) { ... }
}Expand description
Implemented for custom views, responsible for setting up the view state once the binary is open.
Required Methods§
Sourcefn initialize(&mut self, view: &BinaryView) -> bool
fn initialize(&mut self, view: &BinaryView) -> bool
Initializes the opened binary view state.
Use this to populate the BinaryView with sections, segments, and other view data.
NOTE: You must add at least one segment to the view, otherwise calls to BinaryViewType::create
will fail.
NOTE: This will be called on every subsequent open of a database, any view data applied here should be expected to be regenerated on every open.
Provided Methods§
Sourcefn on_after_snapshot_data_applied(&mut self)
fn on_after_snapshot_data_applied(&mut self)
Called after deserialization of the current database snapshot has completed and all the view data inside that snapshot has been applied to the view (like sections and segments).
Useful if you need to regenerate temporary data based on the view state.