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: Option<String>,
value: Option<String>,
},
DirectoryName {
prompt: String,
default: Option<String>,
value: Option<String>,
},
Checkbox {
prompt: String,
default: Option<bool>,
value: bool,
},
}Expand description
A field within a form.
Variants§
Label
Separator
TextLine
MultilineText
Integer
Address
Fields
view: Option<Ref<BinaryView>>Choice
OpenFileName
Fields
SaveFileName
Fields
DirectoryName
Checkbox
Implementations§
Source§impl FormInputField
impl FormInputField
pub fn from_raw(value: &BNFormInputField) -> Self
pub fn from_owned_raw(value: BNFormInputField) -> Self
pub fn into_raw(&self) -> BNFormInputField
pub fn free_raw(value: BNFormInputField)
pub fn as_type(&self) -> BNFormInputFieldType
Sourcepub fn try_prompt(&self) -> Option<String>
pub fn try_prompt(&self) -> Option<String>
Mapping to the BNFormInputField::prompt field.
Sourcepub fn try_view(&self) -> Option<Ref<BinaryView>>
pub fn try_view(&self) -> Option<Ref<BinaryView>>
Mapping to the BNFormInputField::view field.
Sourcepub fn try_current_address(&self) -> Option<u64>
pub fn try_current_address(&self) -> Option<u64>
Mapping to the BNFormInputField::currentAddress field.
Sourcepub fn try_choices(&self) -> Option<Vec<String>>
pub fn try_choices(&self) -> Option<Vec<String>>
Mapping to the BNFormInputField::choices field.
Sourcepub fn try_extension(&self) -> Option<String>
pub fn try_extension(&self) -> Option<String>
Mapping to the BNFormInputField::ext field.
Sourcepub fn try_has_default(&self) -> Option<bool>
pub fn try_has_default(&self) -> Option<bool>
Mapping to the BNFormInputField::hasDefault field.
Sourcepub fn try_default_name(&self) -> Option<String>
pub fn try_default_name(&self) -> Option<String>
Mapping to the BNFormInputField::defaultName field.
Sourcepub fn try_default_int(&self) -> Option<i64>
pub fn try_default_int(&self) -> Option<i64>
Mapping to the BNFormInputField::intDefault field.
Sourcepub fn try_default_address(&self) -> Option<u64>
pub fn try_default_address(&self) -> Option<u64>
Mapping to the BNFormInputField::addressDefault field.
Sourcepub fn try_default_string(&self) -> Option<String>
pub fn try_default_string(&self) -> Option<String>
Mapping to the BNFormInputField::stringDefault field.
Sourcepub fn try_default_index(&self) -> Option<usize>
pub fn try_default_index(&self) -> Option<usize>
Mapping to the BNFormInputField::indexDefault field.
Sourcepub fn try_value_int(&self) -> Option<i64>
pub fn try_value_int(&self) -> Option<i64>
Mapping to the BNFormInputField::intResult field.
Sourcepub fn try_value_address(&self) -> Option<u64>
pub fn try_value_address(&self) -> Option<u64>
Mapping to the BNFormInputField::addressResult field.
Sourcepub fn try_value_string(&self) -> Option<String>
pub fn try_value_string(&self) -> Option<String>
Mapping to the BNFormInputField::stringResult field.
Sourcepub fn try_value_index(&self) -> Option<usize>
pub fn try_value_index(&self) -> Option<usize>
Mapping to the BNFormInputField::indexResult field.
Trait Implementations§
Source§impl Clone for FormInputField
impl Clone for FormInputField
Source§fn clone(&self) -> FormInputField
fn clone(&self) -> FormInputField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FormInputField
impl Debug for FormInputField
Source§impl PartialEq for FormInputField
impl PartialEq for FormInputField
impl Eq for FormInputField
impl StructuralPartialEq for FormInputField
Auto Trait Implementations§
impl Freeze for FormInputField
impl RefUnwindSafe for FormInputField
impl Send for FormInputField
impl Sync for FormInputField
impl Unpin for FormInputField
impl UnwindSafe for FormInputField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more