pub struct TextInputMethodEdit {
pub range: TextSelection,
pub text: String,
pub selection: TextSelection,
}Expand description
An exact platform edit in the current visible text, including an IME preview.
All positions count UTF-16 code units. range is ordered; selection is
directed and refers to the resulting text. Empty text is a real deletion.
This is the portable contract of CoreText’s Range/Text/NewSelection request. A client must reject unsupported filtering, normalization or length changes before mutation; it must never acknowledge a different replacement as exact.
Fields§
§range: TextSelection§text: String§selection: TextSelectionImplementations§
Source§impl TextInputMethodEdit
impl TextInputMethodEdit
pub fn new( range: TextSelection, text: impl Into<String>, selection: TextSelection, ) -> Self
Trait Implementations§
Source§impl Clone for TextInputMethodEdit
impl Clone for TextInputMethodEdit
Source§impl Debug for TextInputMethodEdit
impl Debug for TextInputMethodEdit
impl Eq for TextInputMethodEdit
Source§impl PartialEq for TextInputMethodEdit
impl PartialEq for TextInputMethodEdit
impl StructuralPartialEq for TextInputMethodEdit
Auto Trait Implementations§
impl Freeze for TextInputMethodEdit
impl RefUnwindSafe for TextInputMethodEdit
impl Send for TextInputMethodEdit
impl Sync for TextInputMethodEdit
impl Unpin for TextInputMethodEdit
impl UnsafeUnpin for TextInputMethodEdit
impl UnwindSafe for TextInputMethodEdit
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more