pub struct TextField {
pub name: String,
pub default_value: Option<String>,
pub value: Option<String>,
pub max_length: Option<i32>,
pub multiline: bool,
pub password: bool,
pub file_select: bool,
pub do_not_spell_check: bool,
pub rich_text: bool,
}Expand description
Text field for entering text
Fields§
§name: StringField name (unique identifier)
default_value: Option<String>Default value
value: Option<String>Current value
max_length: Option<i32>Maximum length of text
multiline: boolWhether field is multiline
password: boolWhether field is password field
file_select: boolWhether field is file select
do_not_spell_check: boolWhether spellcheck is enabled
rich_text: boolWhether field allows rich text
Implementations§
Source§impl TextField
impl TextField
Sourcepub fn with_default_value(self, value: impl Into<String>) -> Self
pub fn with_default_value(self, value: impl Into<String>) -> Self
Set the default value
Sourcepub fn with_value(self, value: impl Into<String>) -> Self
pub fn with_value(self, value: impl Into<String>) -> Self
Set the current value
Sourcepub fn with_max_length(self, length: i32) -> Self
pub fn with_max_length(self, length: i32) -> Self
Set maximum length
Sourcepub fn to_dict(&self) -> Dictionary
pub fn to_dict(&self) -> Dictionary
Convert to field dictionary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextField
impl RefUnwindSafe for TextField
impl Send for TextField
impl Sync for TextField
impl Unpin for TextField
impl UnwindSafe for TextField
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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