ScriptingInstance

Struct ScriptingInstance 

Source
pub struct ScriptingInstance { /* private fields */ }

Implementations§

Source§

impl ScriptingInstance

Source

pub fn from_custom<C: CustomScriptingInstance>( provider: &ScriptingProvider, instance: C, ) -> Ref<Self>

Create a core instance of the CustomScriptingInstance.

Source

pub fn notify_output(&self, text: &str)

Notifies the active scripting instance listeners of output, typically called in ScriptingInstance::execute_script_input.

Source

pub fn notify_warning(&self, text: &str)

Notifies the active scripting instance listeners of a warning, typically called in ScriptingInstance::execute_script_input.

Source

pub fn notify_error(&self, text: &str)

Notifies the active scripting instance listeners of an error, typically called in ScriptingInstance::execute_script_input.

Source

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.

Source

pub fn register_output_listener<L: ScriptingOutputListener>( &self, listener: L, ) -> ScriptingInstanceWithListener<'_, L>

Listen for output from this scripting instance.

Source

pub fn delimiters(&self) -> String

Source

pub fn set_delimiters(&self, delimiters: &str)

Source

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.

Source

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.

Source

pub fn execute_script_input_from_filename( &self, filename: &str, ) -> ScriptingProviderExecuteResult

Source

pub fn cancel_script_input(&self)

Request that the current executing input be canceled.

Source

pub fn release_binary_view(&self, view: &BinaryView)

Source

pub fn set_current_binary_view(&self, view: &BinaryView)

Source

pub fn set_current_function(&self, view: &Function)

Source

pub fn set_current_basic_block(&self, view: &BasicBlock<NativeBlock>)

Source

pub fn set_current_address(&self, address: u64)

Source

pub fn set_current_selection(&self, begin: u64, end: u64)

Source

pub fn complete_input(&self, text: &str, state: u64) -> String

Source

pub fn can_complete_arguments(&self, text: &str) -> bool

Checks to see if there are any argument completions available for the given text.

Source

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).

Source

pub fn stop(&self)

Trait Implementations§

Source§

impl ToOwned for ScriptingInstance

Source§

type Owned = Ref<ScriptingInstance>

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
Source§

impl Send for ScriptingInstance

Source§

impl Sync for ScriptingInstance

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more