Struct binaryninja::database::Database
source · pub struct Database { /* private fields */ }
Implementations§
source§impl Database
impl Database
sourcepub fn snapshot(&self, id: i64) -> Option<Snapshot>
pub fn snapshot(&self, id: i64) -> Option<Snapshot>
Get a snapshot by its id, or None if no snapshot with that id exists
sourcepub fn current_snapshot(&self) -> Option<Snapshot>
pub fn current_snapshot(&self) -> Option<Snapshot>
Get the current snapshot
pub fn set_current_snapshot(&self, value: &Snapshot)
pub fn write_snapshot_data<N: BnStrCompatible>( &self, parents: &[i64], file: &BinaryView, name: N, data: &KeyValueStore, auto_save: bool ) -> i64
pub fn write_snapshot_data_with_progress<N, F>( &self, parents: &[i64], file: &BinaryView, name: N, data: &KeyValueStore, auto_save: bool, progress: F ) -> i64
sourcepub fn trim_snapshot(&self, id: i64) -> Result<(), ()>
pub fn trim_snapshot(&self, id: i64) -> Result<(), ()>
Trim a snapshot’s contents in the database by id, but leave the parent/child hierarchy intact. Future references to this snapshot will return False for has_contents
sourcepub fn remove_snapshot(&self, id: i64) -> Result<(), ()>
pub fn remove_snapshot(&self, id: i64) -> Result<(), ()>
Remove a snapshot in the database by id, deleting its contents and references. Attempting to remove a snapshot with children will raise an exception.
pub fn has_global<S: BnStrCompatible>(&self, key: S) -> bool
sourcepub fn global_keys(&self) -> Array<BnString>
pub fn global_keys(&self) -> Array<BnString>
Get a list of keys for all globals in the database
sourcepub fn read_global<S: BnStrCompatible>(&self, key: S) -> Option<BnString>
pub fn read_global<S: BnStrCompatible>(&self, key: S) -> Option<BnString>
Get a specific global by key
sourcepub fn write_global<K: BnStrCompatible, V: BnStrCompatible>(
&self,
key: K,
value: V
) -> bool
pub fn write_global<K: BnStrCompatible, V: BnStrCompatible>( &self, key: K, value: V ) -> bool
Write a global into the database
sourcepub fn read_global_data<S: BnStrCompatible>(&self, key: S) -> Option<DataBuffer>
pub fn read_global_data<S: BnStrCompatible>(&self, key: S) -> Option<DataBuffer>
Get a specific global by key, as a binary buffer
sourcepub fn write_global_data<K: BnStrCompatible>(
&self,
key: K,
value: &DataBuffer
) -> bool
pub fn write_global_data<K: BnStrCompatible>( &self, key: K, value: &DataBuffer ) -> bool
Write a binary buffer into a global in the database
sourcepub fn file(&self) -> Ref<FileMetadata>
pub fn file(&self) -> Ref<FileMetadata>
Get the owning FileMetadata
sourcepub fn analysis_cache(&self) -> KeyValueStore
pub fn analysis_cache(&self) -> KeyValueStore
Get the backing analysis cache kvs
pub fn reload_connection(&self)
pub fn write_analysis_cache(&self, val: &KeyValueStore) -> Result<(), ()>
pub fn snapshot_has_data(&self, id: i64) -> bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Database
impl !Send for Database
impl !Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more