binaryninja::database::snapshot

Struct Snapshot

source
pub struct Snapshot { /* private fields */ }

Implementations§

source§

impl Snapshot

source

pub fn database(&self) -> Database

Get the owning database

source

pub fn id(&self) -> SnapshotId

Get the numerical id

source

pub fn name(&self) -> BnString

Get the displayed snapshot name

source

pub fn set_name<S: BnStrCompatible>(&self, value: S)

Set the displayed snapshot name

source

pub fn is_auto_save(&self) -> bool

If the snapshot was the result of an auto-save

source

pub fn has_contents(&self) -> bool

If the snapshot has contents, and has not been trimmed

source

pub fn has_undo(&self) -> bool

If the snapshot has undo data

source

pub fn first_parent(&self) -> Option<Snapshot>

Get the first parent of the snapshot, or None if it has no parents

source

pub fn parents(&self) -> Array<Snapshot>

Get a list of all parent snapshots of the snapshot

source

pub fn children(&self) -> Array<Snapshot>

Get a list of all child snapshots of the snapshot

source

pub fn file_contents(&self) -> Option<DataBuffer>

Get a buffer of the raw data at the time of the snapshot

source

pub fn file_contents_hash(&self) -> Option<DataBuffer>

Get a hash of the data at the time of the snapshot

source

pub fn undo_entries(&self) -> Array<UndoEntry>

Get a list of undo entries at the time of the snapshot

source

pub fn undo_entries_with_progress<P: ProgressCallback>( &self, progress: P, ) -> Array<UndoEntry>

source

pub fn read_data(&self) -> Ref<KeyValueStore>

Get the backing kvs data with snapshot fields

source

pub fn read_data_with_progress<P: ProgressCallback>( &self, progress: P, ) -> Ref<KeyValueStore>

source

pub fn undo_data(&self) -> DataBuffer

source

pub fn store_data(&self, data: &KeyValueStore) -> bool

source

pub fn store_data_with_progress<P: ProgressCallback>( &self, data: &KeyValueStore, progress: P, ) -> bool

source

pub fn has_ancestor(self, other: &Snapshot) -> bool

Determine if this snapshot has another as an ancestor

Trait Implementations§

source§

impl CoreArrayProvider for Snapshot

source§

impl Debug for Snapshot

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ToOwned for Snapshot

source§

type Owned = Ref<Snapshot>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.