pub struct TextInputProps<'a, A> {
pub value: &'a str,
pub placeholder: &'a str,
pub is_focused: bool,
pub style: TextInputStyle,
pub on_change: TextInputCallback<A>,
pub on_submit: TextInputCallback<A>,
pub on_cursor_move: Option<TextInputCursorCallback<A>>,
pub on_cancel: Option<TextInputCallback<A>>,
}Expand description
Props for TextInput component
Fields§
§value: &'a strCurrent input value
placeholder: &'a strPlaceholder text when empty
is_focused: boolWhether this component has focus
style: TextInputStyleUnified styling
on_change: TextInputCallback<A>Callback when value changes
on_submit: TextInputCallback<A>Callback when user submits (Enter or submit command)
on_cursor_move: Option<TextInputCursorCallback<A>>Callback when cursor moves without content change
on_cancel: Option<TextInputCallback<A>>Callback when the user runs the cancel command
Trait Implementations§
Source§impl<'a, A: Clone> Clone for TextInputProps<'a, A>
impl<'a, A: Clone> Clone for TextInputProps<'a, A>
Source§fn clone(&self) -> TextInputProps<'a, A>
fn clone(&self) -> TextInputProps<'a, A>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, A> Freeze for TextInputProps<'a, A>
impl<'a, A> !RefUnwindSafe for TextInputProps<'a, A>
impl<'a, A> !Send for TextInputProps<'a, A>
impl<'a, A> !Sync for TextInputProps<'a, A>
impl<'a, A> Unpin for TextInputProps<'a, A>
impl<'a, A> UnsafeUnpin for TextInputProps<'a, A>
impl<'a, A> !UnwindSafe for TextInputProps<'a, A>
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> 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