pub trait HasSelectionData: Any {
// Required method
fn as_any(&self) -> &dyn Any;
// Provided method
fn selection(&self) -> Option<TextSelection> { ... }
}Required Methods§
Provided Methods§
Sourcefn selection(&self) -> Option<TextSelection>
fn selection(&self) -> Option<TextSelection>
The selection inside a text control.
Return None when the event did not originate from a text control with
selection offsets. Document selections should use a separate API instead
of being mixed into this payload.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl HasSelectionData for SerializedSelectionData
Available on crate feature
serialize only.