pub trait CustomScriptingInstance {
// Required methods
fn execute_script_input(
&self,
instance: &ScriptingInstance,
input: &str,
) -> ScriptingProviderExecuteResult;
fn execute_script_input_from_file(
&self,
instance: &ScriptingInstance,
file_path: &Path,
) -> ScriptingProviderExecuteResult;
// Provided methods
fn cancel_script_input(&self) { ... }
fn release_binary_view(&self, _view: &BinaryView) { ... }
fn set_current_binary_view(&self, _view: Option<&BinaryView>) { ... }
fn set_current_function(&self, _func: Option<&Function>) { ... }
fn set_current_basic_block(&self, _block: Option<&BasicBlock<NativeBlock>>) { ... }
fn set_current_selection(&self, _begin: u64, _end: u64) { ... }
fn complete_input(&self, _text: &str, _state: u64) -> String { ... }
fn can_complete_arguments(&self, _text: &str) -> bool { ... }
fn complete_arguments(&self, _text: &str) -> (String, u64) { ... }
fn stop(&self) { ... }
}Required Methods§
fn execute_script_input( &self, instance: &ScriptingInstance, input: &str, ) -> ScriptingProviderExecuteResult
fn execute_script_input_from_file( &self, instance: &ScriptingInstance, file_path: &Path, ) -> ScriptingProviderExecuteResult
Provided Methods§
Sourcefn cancel_script_input(&self)
fn cancel_script_input(&self)
Called when the user requests that the current executing input be canceled.
Sourcefn release_binary_view(&self, _view: &BinaryView)
fn release_binary_view(&self, _view: &BinaryView)
Called when the binary view is no longer available.
This function should release any resources associated with the binary view.
Sourcefn set_current_binary_view(&self, _view: Option<&BinaryView>)
fn set_current_binary_view(&self, _view: Option<&BinaryView>)
Called when the current binary view is changed.
The view will be None if there is no current binary view.
Sourcefn set_current_function(&self, _func: Option<&Function>)
fn set_current_function(&self, _func: Option<&Function>)
Called when the current function is changed.
The func will be None if there is no current function.
Sourcefn set_current_basic_block(&self, _block: Option<&BasicBlock<NativeBlock>>)
fn set_current_basic_block(&self, _block: Option<&BasicBlock<NativeBlock>>)
Called when the current basic block is changed.
The block will be None if there is no current basic block.
Sourcefn set_current_selection(&self, _begin: u64, _end: u64)
fn set_current_selection(&self, _begin: u64, _end: u64)
Called when the current selected address range is changed.
fn complete_input(&self, _text: &str, _state: u64) -> String
Sourcefn can_complete_arguments(&self, _text: &str) -> bool
fn can_complete_arguments(&self, _text: &str) -> bool
Called to check whether the user can complete arguments from the given string.
Make sure to override this and CustomScriptingInstance::complete_arguments to enable argument completion.
Sourcefn complete_arguments(&self, _text: &str) -> (String, u64)
fn complete_arguments(&self, _text: &str) -> (String, u64)
Called when the user requests completion of arguments.
Make sure to override this and CustomScriptingInstance::can_complete_arguments to enable argument completion.
Returns the completion string with the character position in the string to place the popup at.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".