binaryninja::interaction::form

Enum FormInputField

source
pub enum FormInputField {
    Label {
        prompt: String,
    },
    Separator,
    TextLine {
        prompt: String,
        default: Option<String>,
        value: Option<String>,
    },
    MultilineText {
        prompt: String,
        default: Option<String>,
        value: Option<String>,
    },
    Integer {
        prompt: String,
        default: Option<i64>,
        value: i64,
    },
    Address {
        prompt: String,
        view: Option<Ref<BinaryView>>,
        current_address: u64,
        default: Option<u64>,
        value: u64,
    },
    Choice {
        prompt: String,
        choices: Vec<String>,
        default: Option<usize>,
        value: usize,
    },
    OpenFileName {
        prompt: String,
        extension: Option<String>,
        default: Option<String>,
        value: Option<String>,
    },
    SaveFileName {
        prompt: String,
        extension: Option<String>,
        default_name: Option<String>,
        default: Option<String>,
        value: Option<String>,
    },
    DirectoryName {
        prompt: String,
        default_name: Option<String>,
        default: Option<String>,
        value: Option<String>,
    },
}
Expand description

A field within a form.

Variants§

§

Label

Fields

§prompt: String
§

Separator

§

TextLine

Fields

§prompt: String
§default: Option<String>
§

MultilineText

Fields

§prompt: String
§default: Option<String>
§

Integer

Fields

§prompt: String
§default: Option<i64>
§value: i64
§

Address

Fields

§prompt: String
§current_address: u64
§default: Option<u64>
§value: u64
§

Choice

Fields

§prompt: String
§choices: Vec<String>
§default: Option<usize>
§value: usize
§

OpenFileName

Fields

§prompt: String
§extension: Option<String>

File extension to filter on.

§default: Option<String>
§

SaveFileName

Fields

§prompt: String
§extension: Option<String>

File extension to filter on.

§default_name: Option<String>

Default file name to fill.

§default: Option<String>
§

DirectoryName

Fields

§prompt: String
§default_name: Option<String>
§default: Option<String>

Implementations§

source§

impl FormInputField

source

pub fn from_raw(value: &BNFormInputField) -> Self

source

pub fn from_owned_raw(value: BNFormInputField) -> Self

source

pub fn into_raw(&self) -> BNFormInputField

source

pub fn free_raw(value: BNFormInputField)

source

pub fn as_type(&self) -> BNFormInputFieldType

source

pub fn try_prompt(&self) -> Option<String>

Mapping to the BNFormInputField::prompt field.

source

pub fn try_view(&self) -> Option<Ref<BinaryView>>

Mapping to the BNFormInputField::view field.

source

pub fn try_current_address(&self) -> Option<u64>

Mapping to the BNFormInputField::currentAddress field.

source

pub fn try_choices(&self) -> Option<Vec<String>>

Mapping to the BNFormInputField::choices field.

source

pub fn try_extension(&self) -> Option<String>

Mapping to the BNFormInputField::ext field.

source

pub fn try_has_default(&self) -> Option<bool>

Mapping to the BNFormInputField::hasDefault field.

source

pub fn try_default_name(&self) -> Option<String>

Mapping to the BNFormInputField::defaultName field.

source

pub fn try_default_int(&self) -> Option<i64>

Mapping to the BNFormInputField::intDefault field.

source

pub fn try_default_address(&self) -> Option<u64>

Mapping to the BNFormInputField::addressDefault field.

source

pub fn try_default_string(&self) -> Option<String>

Mapping to the BNFormInputField::stringDefault field.

source

pub fn try_default_index(&self) -> Option<usize>

Mapping to the BNFormInputField::indexDefault field.

source

pub fn try_value_int(&self) -> Option<i64>

Mapping to the BNFormInputField::intResult field.

source

pub fn try_value_address(&self) -> Option<u64>

Mapping to the BNFormInputField::addressResult field.

source

pub fn try_value_string(&self) -> Option<String>

Mapping to the BNFormInputField::stringResult field.

source

pub fn try_value_index(&self) -> Option<usize>

Mapping to the BNFormInputField::indexResult field.

Trait Implementations§

source§

impl Clone for FormInputField

source§

fn clone(&self) -> FormInputField

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FormInputField

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for FormInputField

source§

fn eq(&self, other: &FormInputField) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for FormInputField

source§

impl StructuralPartialEq for FormInputField

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.