pub trait BinaryViewBase: AsRef<BinaryView> {
Show 19 methods
// Required methods
fn entry_point(&self) -> u64;
fn default_endianness(&self) -> Endianness;
fn address_size(&self) -> usize;
// Provided methods
fn read(&self, _buf: &mut [u8], _offset: u64) -> usize { ... }
fn write(&self, _offset: u64, _data: &[u8]) -> usize { ... }
fn insert(&self, _offset: u64, _data: &[u8]) -> usize { ... }
fn remove(&self, _offset: u64, _len: usize) -> usize { ... }
fn offset_valid(&self, offset: u64) -> bool { ... }
fn offset_readable(&self, offset: u64) -> bool { ... }
fn offset_writable(&self, offset: u64) -> bool { ... }
fn offset_executable(&self, offset: u64) -> bool { ... }
fn offset_backed_by_file(&self, offset: u64) -> bool { ... }
fn next_valid_offset_after(&self, offset: u64) -> u64 { ... }
fn modification_status(&self, _offset: u64) -> ModificationStatus { ... }
fn start(&self) -> u64 { ... }
fn len(&self) -> u64 { ... }
fn executable(&self) -> bool { ... }
fn relocatable(&self) -> bool { ... }
fn save(&self) -> bool { ... }
}Required Methods§
fn entry_point(&self) -> u64
fn default_endianness(&self) -> Endianness
fn address_size(&self) -> usize
Provided Methods§
fn read(&self, _buf: &mut [u8], _offset: u64) -> usize
fn write(&self, _offset: u64, _data: &[u8]) -> usize
fn insert(&self, _offset: u64, _data: &[u8]) -> usize
fn remove(&self, _offset: u64, _len: usize) -> usize
Sourcefn offset_valid(&self, offset: u64) -> bool
fn offset_valid(&self, offset: u64) -> bool
Check if the offset is valid for the current view.
Sourcefn offset_readable(&self, offset: u64) -> bool
fn offset_readable(&self, offset: u64) -> bool
Check if the offset is readable for the current view.
Sourcefn offset_writable(&self, offset: u64) -> bool
fn offset_writable(&self, offset: u64) -> bool
Check if the offset is writable for the current view.
Sourcefn offset_executable(&self, offset: u64) -> bool
fn offset_executable(&self, offset: u64) -> bool
Check if the offset is executable for the current view.
Sourcefn offset_backed_by_file(&self, offset: u64) -> bool
fn offset_backed_by_file(&self, offset: u64) -> bool
Check if the offset is backed by the original file and not added after the fact.
Sourcefn next_valid_offset_after(&self, offset: u64) -> u64
fn next_valid_offset_after(&self, offset: u64) -> u64
Get the next valid offset after the provided offset, useful if you need to iterate over all
readable offsets in the view.
Sourcefn modification_status(&self, _offset: u64) -> ModificationStatus
fn modification_status(&self, _offset: u64) -> ModificationStatus
Whether the data at the given offset been modified (patched).