FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextInputMethodEdit

    struct · ferroui-base · v0.5.0

    struct TextInputMethodEdit
    

    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.

    View source

    Members

    range

    range: super::TextSelection
    

    Source

    text

    text: String
    

    Source

    selection

    selection: super::TextSelection
    

    Source

    new

    fn new(range: TextSelection, text: impl Into<String>, selection: TextSelection) -> Self
    

    Source

    apply_to

    fn apply_to(self: &Self, current: &str) -> Result<String, TextInputMethodError>
    

    Validates both ranges without clamping or splitting a surrogate pair and returns the complete candidate text. No client state is changed.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.