pub struct UpdateTextInput {
pub node_id: WidgetId,
pub new_text: String,
pub new_caret: usize,
pub new_anchor: usize,
pub old_value: TextEditingValue,
pub new_value: TextEditingValue,
pub source: TextEditSource,
pub phase: TextEditPhase,
pub editing_action: Option<TextInputAction>,
pub validation_state: Option<TextFieldValidationState>,
pub validation_message: Option<String>,
}Expand description
Structured details for a text-input edit.
Every TextInput binding receives this value through
ActionInput::text_change, while the
bound action payload continues to carry the application’s stable context.
Fields§
§node_id: WidgetIdThe widget identity of the text input that changed.
new_text: StringThe complete new text value.
new_caret: usizeByte offset of the caret (insertion point).
new_anchor: usizeByte offset of the selection anchor (equals new_caret when no
selection is active).
old_value: TextEditingValueComplete value before the transaction. Older shell boundaries may not know it and use an empty value until they adopt the complete-value API.
new_value: TextEditingValueComplete value after the transaction.
source: TextEditSourceOrigin of this edit.
phase: TextEditPhaseLifecycle phase represented by this action.
editing_action: Option<TextInputAction>Configured software-keyboard action for submit/completion events.
validation_state: Option<TextFieldValidationState>Validation state when phase is TextEditPhase::Validated.
validation_message: Option<String>Accessible validation detail associated with validation_state.
Implementations§
Source§impl UpdateTextInput
impl UpdateTextInput
pub fn from_values( node_id: WidgetId, old_value: TextEditingValue, new_value: TextEditingValue, source: TextEditSource, phase: TextEditPhase, ) -> Self
Trait Implementations§
Source§impl Clone for UpdateTextInput
impl Clone for UpdateTextInput
Source§fn clone(&self) -> UpdateTextInput
fn clone(&self) -> UpdateTextInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateTextInput
impl Debug for UpdateTextInput
Source§impl Default for UpdateTextInput
impl Default for UpdateTextInput
Source§impl<'de> Deserialize<'de> for UpdateTextInput
impl<'de> Deserialize<'de> for UpdateTextInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for UpdateTextInput
Source§impl PartialEq for UpdateTextInput
impl PartialEq for UpdateTextInput
Source§impl Serialize for UpdateTextInput
impl Serialize for UpdateTextInput
impl StructuralPartialEq for UpdateTextInput
Auto Trait Implementations§
impl Freeze for UpdateTextInput
impl RefUnwindSafe for UpdateTextInput
impl Send for UpdateTextInput
impl Sync for UpdateTextInput
impl Unpin for UpdateTextInput
impl UnsafeUnpin for UpdateTextInput
impl UnwindSafe for UpdateTextInput
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.