Skip to main content

Textfield

Struct Textfield 

Source
pub struct Textfield {
Show 29 fields pub autocorrect: Option<bool>, pub autofill_hints: Option<StylesAutofillHints>, pub autofocus: Option<bool>, pub build_counter: Option<Listener>, pub drag_start_behavior: Option<StylesDragStartBehavior>, pub enable_interactive_selection: Option<bool>, pub enabled: Option<bool>, pub expands: Option<bool>, pub keyboard_type: Option<StylesTextInputType>, pub max_length: Option<i64>, pub max_length_enforcement: Option<StylesMaxLengthEnforcement>, pub max_lines: Option<i64>, pub min_lines: Option<i64>, pub name: Option<String>, pub obscure_text: Option<bool>, pub on_app_private_command: Option<Listener>, pub on_changed: Option<Listener>, pub on_editing_complete: Option<Listener>, pub on_submitted: Option<Listener>, pub on_tap: Option<Listener>, pub read_only: Option<bool>, pub show_cursor: Option<bool>, pub style: Option<StylesTextFieldStyle>, pub text_capitalization: Option<StylesTextCapitalization>, pub text_direction: Option<StylesTextDirection>, pub text_input_action: Option<StylesTextInputAction>, pub toolbar_options: Option<StylesToolbarOptions>, pub type_: Value, pub value: String,
}
Expand description

Element of type TextField

Fields§

§autocorrect: Option<bool>

Whether to enable the autocorrection

§autofill_hints: Option<StylesAutofillHints>

The type of this text input to provide autofill hints.

§autofocus: Option<bool>

Whether this Textfield should be focused initially.

§build_counter: Option<Listener>

Callback that generates a custom counter view.

§drag_start_behavior: Option<StylesDragStartBehavior>

Determines the way that drag start behavior is handled.

§enable_interactive_selection: Option<bool>

Whether to enable user interface options to change the text selection.

§enabled: Option<bool>

Whether the text field is enabled.

§expands: Option<bool>

Whether the TextField is sized to fill its parent.

§keyboard_type: Option<StylesTextInputType>

The type of the keyboard to use for editing the text.

§max_length: Option<i64>

The maximum number of characters to allow in the text field.

§max_length_enforcement: Option<StylesMaxLengthEnforcement>

Determines how the maxLength limit should be enforced.

§max_lines: Option<i64>

The maximum number of lines to show at one time.

§min_lines: Option<i64>

The minimum number of lines to occupy on the screen.

§name: Option<String>

The name that will be used in the form.

§obscure_text: Option<bool>

Whether to hide the text being edited.

§on_app_private_command: Option<Listener>

This is used to receive a private command from the input method.

§on_changed: Option<Listener>

Callback when the user changes the text field value.

§on_editing_complete: Option<Listener>

Callback when the user finishes editing the text field.

§on_submitted: Option<Listener>

Callback when the user tells he is done editing the text field.

§on_tap: Option<Listener>

Callback when the user taps on the text field.

§read_only: Option<bool>

Whether the text can be changed.

§show_cursor: Option<bool>

Whether to show the cursor.

§style: Option<StylesTextFieldStyle>

The style of the Textfield.

§text_capitalization: Option<StylesTextCapitalization>

Configures how the platform keyboard will select an uppercase or lowercase keyboard.

§text_direction: Option<StylesTextDirection>

The direction of the text.

§text_input_action: Option<StylesTextInputAction>

The type of the action button to use for the keyboard.

§toolbar_options: Option<StylesToolbarOptions>

Configuration of toolbar options

§type_: Value

The identifier of the component

§value: String

The value displayed inside the Textfield

Implementations§

Trait Implementations§

Source§

impl Clone for Textfield

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Textfield

Source§

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

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

impl<'de> Deserialize<'de> for Textfield

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Textfield> for Textfield

Source§

fn from(value: &Textfield) -> Self

Converts to this type from the input type.
Source§

impl From<Textfield> for LenraComponent

Source§

fn from(value: Textfield) -> Self

Converts to this type from the input type.
Source§

impl From<Textfield> for Textfield

Source§

fn from(value: Textfield) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Textfield

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Textfield> for Textfield

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(value: Textfield) -> Result<Self, String>

Performs the conversion.

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.