pub struct ScriptingInstance { /* private fields */ }Implementations§
Source§impl ScriptingInstance
impl ScriptingInstance
Sourcepub fn from_custom<C: CustomScriptingInstance>(
provider: &ScriptingProvider,
instance: C,
) -> Ref<Self>
pub fn from_custom<C: CustomScriptingInstance>( provider: &ScriptingProvider, instance: C, ) -> Ref<Self>
Create a core instance of the CustomScriptingInstance.
Sourcepub fn notify_output(&self, text: &str)
pub fn notify_output(&self, text: &str)
Notifies the active scripting instance listeners of output, typically called in ScriptingInstance::execute_script_input.
Sourcepub fn notify_warning(&self, text: &str)
pub fn notify_warning(&self, text: &str)
Notifies the active scripting instance listeners of a warning, typically called in ScriptingInstance::execute_script_input.
Sourcepub fn notify_error(&self, text: &str)
pub fn notify_error(&self, text: &str)
Notifies the active scripting instance listeners of an error, typically called in ScriptingInstance::execute_script_input.
Sourcepub fn notify_input_ready_state(&self, state: ScriptingProviderInputReadyState)
pub fn notify_input_ready_state(&self, state: ScriptingProviderInputReadyState)
Notify the scripting instance that the input state has changed.
When constructing an instance, the default state is ScriptingProviderInputReadyState::NotReadyForInput
which prevents the scripting instance from accepting input until explicitly notified otherwise.
Sourcepub fn register_output_listener<L: ScriptingOutputListener>(
&self,
listener: L,
) -> ScriptingInstanceWithListener<'_, L>
pub fn register_output_listener<L: ScriptingOutputListener>( &self, listener: L, ) -> ScriptingInstanceWithListener<'_, L>
Listen for output from this scripting instance.
pub fn delimiters(&self) -> String
pub fn set_delimiters(&self, delimiters: &str)
Sourcepub fn input_ready_state(&self) -> ScriptingProviderInputReadyState
pub fn input_ready_state(&self) -> ScriptingProviderInputReadyState
The current input ready state of the scripting instance.
If this is set to ScriptingProviderInputReadyState::NotReadyForInput, the scripting instance will not accept input.
To interact with the scripting instance, ensure it is in the correct state using ScriptingInstance::notify_input_ready_state.
Sourcepub fn execute_script_input(
&self,
input: &str,
) -> ScriptingProviderExecuteResult
pub fn execute_script_input( &self, input: &str, ) -> ScriptingProviderExecuteResult
Execute the input within this instance.
Before calling this, make sure the scripting instance is ready for input with ScriptingInstance::input_ready_state.
pub fn execute_script_input_from_filename( &self, filename: &str, ) -> ScriptingProviderExecuteResult
Sourcepub fn cancel_script_input(&self)
pub fn cancel_script_input(&self)
Request that the current executing input be canceled.
pub fn release_binary_view(&self, view: &BinaryView)
pub fn set_current_binary_view(&self, view: &BinaryView)
pub fn set_current_function(&self, view: &Function)
pub fn set_current_basic_block(&self, view: &BasicBlock<NativeBlock>)
pub fn set_current_address(&self, address: u64)
pub fn set_current_selection(&self, begin: u64, end: u64)
pub fn complete_input(&self, text: &str, state: u64) -> String
Sourcepub fn can_complete_arguments(&self, text: &str) -> bool
pub fn can_complete_arguments(&self, text: &str) -> bool
Checks to see if there are any argument completions available for the given text.
Sourcepub fn complete_arguments(&self, text: &str) -> (String, u64)
pub fn complete_arguments(&self, text: &str) -> (String, u64)
Returns the completion string and the position of the argument being completed (in the utf8 string).