pub struct UpdateTextInput {
pub node_id: NodeId,
pub new_text: String,
pub new_caret: usize,
pub new_anchor: usize,
}Expand description
Action dispatched by the text-editing controller when the user modifies a
TextInput field.
Contains the full new text and updated caret/selection positions.
Fields§
§node_id: NodeIdThe IR node id 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).
Trait Implementations§
Source§impl Action for UpdateTextInput
impl Action for UpdateTextInput
Source§impl Clone for UpdateTextInput
impl Clone for UpdateTextInput
Source§fn clone(&self) -> UpdateTextInput
fn clone(&self) -> UpdateTextInput
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 moreSource§impl Debug for UpdateTextInput
impl Debug 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for UpdateTextInput
impl PartialEq for UpdateTextInput
Source§impl Serialize for UpdateTextInput
impl Serialize for UpdateTextInput
impl Eq 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
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.