Skip to main content

HasBeforeInputData

Trait HasBeforeInputData 

Source
pub trait HasBeforeInputData: Any {
    // Required methods
    fn input_type(&self) -> InputType;
    fn data(&self) -> Option<String>;
    fn is_composing(&self) -> bool;
    fn value(&self) -> String;
    fn as_any(&self) -> &dyn Any;
}
Expand description

An object exposing all the data backing a BeforeInputData event.

Required Methods§

Source

fn input_type(&self) -> InputType

The type of input change. See BeforeInputData::input_type.

Source

fn data(&self) -> Option<String>

The text data being inserted, or None if the change carries no text.

Source

fn is_composing(&self) -> bool

Whether the event is fired during an active IME composition session.

Source

fn value(&self) -> String

The current value of the editable target, prior to the change.

Source

fn as_any(&self) -> &dyn Any

Return self as Any so the event can be downcast to its concrete type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§