ObjectDestructor in binaryninja - Rust

Trait ObjectDestructor

Source

pub trait ObjectDestructor:
    'static
    + Sync
    + Sized {
    // Provided methods
    fn destruct_view(&self, _view: &BinaryView) { ... }
    fn destruct_file_metadata(&self, _metadata: &FileMetadata) { ... }
    fn destruct_function(&self, _func: &Function) { ... }
    unsafe extern "C" fn cb_destruct_binary_view(
        ctxt: *mut c_void,
        view: *mut BNBinaryView,
    ) { ... }
    unsafe extern "C" fn cb_destruct_file_metadata(
        ctxt: *mut c_void,
        file: *mut BNFileMetadata,
    ) { ... }
    unsafe extern "C" fn cb_destruct_function(
        ctxt: *mut c_void,
        func: *mut BNFunction,
    ) { ... }
    unsafe fn as_callbacks(&'static mut self) -> BNObjectDestructionCallbacks { ... }
    fn register(&'static mut self) { ... }
    fn unregister(&'static mut self) { ... }
}
Expand description

The trait required for receiving core object destruction callbacks.

Source
Source
Source
Source
Source
Source
Source
Source
Source

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.