binaryninja::data_notification

Struct DataNotificationClosure

source
pub struct DataNotificationClosure<'a> { /* private fields */ }
Expand description

Implement closures that will be called by on the event of data modification.

Once dropped the closures will stop being called.

NOTE: Closures are not executed on the same thread as the event that occurred, you must not depend on any serial behavior

§Example

let custom = DataNotificationClosure::default()
    .function_updated(|_bv: &BinaryView, _func: &Function| todo!() )
    // other calls should be added here
    .register(&bv);

Implementations§

source§

impl<'a> DataNotificationClosure<'a>

source

pub fn new() -> Self

source

pub fn notification_barrier<F: FnMut(&BinaryView) -> u64 + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_written<F: FnMut(&BinaryView, u64, usize) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_inserted<F: FnMut(&BinaryView, u64, usize) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_removed<F: FnMut(&BinaryView, u64, u64) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn function_added<F: FnMut(&BinaryView, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn function_removed<F: FnMut(&BinaryView, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn function_updated<F: FnMut(&BinaryView, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn function_update_requested<F: FnMut(&BinaryView, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_variable_added<F: FnMut(&BinaryView, &DataVariable) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_variable_removed<F: FnMut(&BinaryView, &DataVariable) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_variable_updated<F: FnMut(&BinaryView, &DataVariable) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn data_metadata_updated<F: FnMut(&BinaryView, u64) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn tag_type_updated<F: FnMut(&BinaryView, &TagType) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn tag_added<F: FnMut(&BinaryView, &TagReference) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn tag_removed<F: FnMut(&BinaryView, &TagReference) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn tag_updated<F: FnMut(&BinaryView, &TagReference) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn symbol_added<F: FnMut(&BinaryView, &Symbol) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn symbol_removed<F: FnMut(&BinaryView, &Symbol) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn symbol_updated<F: FnMut(&BinaryView, &Symbol) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn string_found<F: FnMut(&BinaryView, StringType, u64, usize) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn string_removed<F: FnMut(&BinaryView, StringType, u64, usize) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_defined<F: FnMut(&BinaryView, &QualifiedName, &Type) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_undefined<F: FnMut(&BinaryView, &QualifiedName, &Type) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_reference_changed<F: FnMut(&BinaryView, &QualifiedName, &Type) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_field_reference_changed<F: FnMut(&BinaryView, &QualifiedName, u64) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn segment_added<F: FnMut(&BinaryView, &Segment) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn segment_removed<F: FnMut(&BinaryView, &Segment) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn segment_updated<F: FnMut(&BinaryView, &Segment) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn section_added<F: FnMut(&BinaryView, &Section) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn section_removed<F: FnMut(&BinaryView, &Section) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn section_updated<F: FnMut(&BinaryView, &Section) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_name_updated<F: FnMut(&BinaryView, &str, &Component) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_added<F: FnMut(&BinaryView, &Component) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_moved<F: FnMut(&BinaryView, &Component, &Component, &Component) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_removed<F: FnMut(&BinaryView, &Component, &Component) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_function_added<F: FnMut(&BinaryView, &Component, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_function_removed<F: FnMut(&BinaryView, &Component, &Function) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_data_variable_added<F: FnMut(&BinaryView, &Component, &DataVariable) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn component_data_variable_removed<F: FnMut(&BinaryView, &Component, &DataVariable) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_library_added<F: FnMut(&BinaryView, &ExternalLibrary) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_library_updated<F: FnMut(&BinaryView, &ExternalLibrary) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_library_removed<F: FnMut(&BinaryView, &ExternalLibrary) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_location_added<F: FnMut(&BinaryView, &ExternalLocation) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_location_updated<F: FnMut(&BinaryView, &ExternalLocation) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn external_location_removed<F: FnMut(&BinaryView, &ExternalLocation) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_archive_attached<F: FnMut(&BinaryView, &str, &[u8]) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_archive_detached<F: FnMut(&BinaryView, &str, &[u8]) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_archive_connected<F: FnMut(&BinaryView, &TypeArchive) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn type_archive_disconnected<F: FnMut(&BinaryView, &TypeArchive) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn undo_entry_added<F: FnMut(&BinaryView, &UndoEntry) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn undo_entry_taken<F: FnMut(&BinaryView, &UndoEntry) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn redo_entry_taken<F: FnMut(&BinaryView, &UndoEntry) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn rebased<F: FnMut(&BinaryView, &BinaryView) + Sync + Send + 'a>( self, param: F, ) -> Self

source

pub fn register(self, view: &BinaryView) -> DataNotificationHandle<'a, Self>

Register the closures to be notified up until the DataNotificationHandle is dropped.

Trait Implementations§

source§

impl CustomDataNotification for DataNotificationClosure<'_>

source§

fn notification_barrier(&mut self, view: &BinaryView) -> u64

source§

fn data_written(&mut self, view: &BinaryView, offset: u64, len: usize)

source§

fn data_inserted(&mut self, view: &BinaryView, offset: u64, len: usize)

source§

fn data_removed(&mut self, view: &BinaryView, offset: u64, len: u64)

source§

fn function_added(&mut self, view: &BinaryView, func: &Function)

source§

fn function_removed(&mut self, view: &BinaryView, func: &Function)

source§

fn function_updated(&mut self, view: &BinaryView, func: &Function)

source§

fn function_update_requested(&mut self, view: &BinaryView, func: &Function)

source§

fn data_variable_added(&mut self, view: &BinaryView, var: &DataVariable)

source§

fn data_variable_removed(&mut self, view: &BinaryView, var: &DataVariable)

source§

fn data_variable_updated(&mut self, view: &BinaryView, var: &DataVariable)

source§

fn data_metadata_updated(&mut self, view: &BinaryView, offset: u64)

source§

fn tag_type_updated(&mut self, view: &BinaryView, tag_type: &TagType)

source§

fn tag_added(&mut self, view: &BinaryView, tag_ref: &TagReference)

source§

fn tag_removed(&mut self, view: &BinaryView, tag_ref: &TagReference)

source§

fn tag_updated(&mut self, view: &BinaryView, tag_ref: &TagReference)

source§

fn symbol_added(&mut self, view: &BinaryView, sym: &Symbol)

source§

fn symbol_removed(&mut self, view: &BinaryView, sym: &Symbol)

source§

fn symbol_updated(&mut self, view: &BinaryView, sym: &Symbol)

source§

fn string_found( &mut self, view: &BinaryView, type_: StringType, offset: u64, len: usize, )

source§

fn string_removed( &mut self, view: &BinaryView, type_: StringType, offset: u64, len: usize, )

source§

fn type_defined( &mut self, view: &BinaryView, name: &QualifiedName, type_: &Type, )

source§

fn type_undefined( &mut self, view: &BinaryView, name: &QualifiedName, type_: &Type, )

source§

fn type_reference_changed( &mut self, view: &BinaryView, name: &QualifiedName, type_: &Type, )

source§

fn type_field_reference_changed( &mut self, view: &BinaryView, name: &QualifiedName, offset: u64, )

source§

fn segment_added(&mut self, view: &BinaryView, segment: &Segment)

source§

fn segment_removed(&mut self, view: &BinaryView, segment: &Segment)

source§

fn segment_updated(&mut self, view: &BinaryView, segment: &Segment)

source§

fn section_added(&mut self, view: &BinaryView, section: &Section)

source§

fn section_removed(&mut self, view: &BinaryView, section: &Section)

source§

fn section_updated(&mut self, view: &BinaryView, section: &Section)

source§

fn component_name_updated( &mut self, view: &BinaryView, previous_name: &str, component: &Component, )

source§

fn component_added(&mut self, view: &BinaryView, component: &Component)

source§

fn component_moved( &mut self, view: &BinaryView, former_parent: &Component, new_parent: &Component, component: &Component, )

source§

fn component_removed( &mut self, view: &BinaryView, former_parent: &Component, component: &Component, )

source§

fn component_function_added( &mut self, view: &BinaryView, component: &Component, function: &Function, )

source§

fn component_function_removed( &mut self, view: &BinaryView, component: &Component, function: &Function, )

source§

fn component_data_variable_added( &mut self, view: &BinaryView, component: &Component, var: &DataVariable, )

source§

fn component_data_variable_removed( &mut self, view: &BinaryView, component: &Component, var: &DataVariable, )

source§

fn external_library_added( &mut self, data: &BinaryView, library: &ExternalLibrary, )

source§

fn external_library_updated( &mut self, data: &BinaryView, library: &ExternalLibrary, )

source§

fn external_library_removed( &mut self, data: &BinaryView, library: &ExternalLibrary, )

source§

fn external_location_added( &mut self, data: &BinaryView, location: &ExternalLocation, )

source§

fn external_location_updated( &mut self, data: &BinaryView, location: &ExternalLocation, )

source§

fn external_location_removed( &mut self, data: &BinaryView, location: &ExternalLocation, )

source§

fn type_archive_attached(&mut self, view: &BinaryView, id: &str, path: &[u8])

source§

fn type_archive_detached(&mut self, view: &BinaryView, id: &str, path: &[u8])

source§

fn type_archive_connected(&mut self, view: &BinaryView, archive: &TypeArchive)

source§

fn type_archive_disconnected( &mut self, view: &BinaryView, archive: &TypeArchive, )

source§

fn undo_entry_added(&mut self, view: &BinaryView, entry: &UndoEntry)

source§

fn undo_entry_taken(&mut self, view: &BinaryView, entry: &UndoEntry)

source§

fn redo_entry_taken(&mut self, view: &BinaryView, entry: &UndoEntry)

source§

fn rebased(&mut self, oldview: &BinaryView, newview: &BinaryView)

source§

fn register<'a>( self, view: &BinaryView, triggers: DataNotificationTriggers, ) -> DataNotificationHandle<'a, Self>
where Self: 'a + Sized,

source§

impl Default for DataNotificationClosure<'_>

source§

fn default() -> Self

Returns the “default value” for a type. 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.