pub trait HasSelectionData: Any {
// Required method
fn as_any(&self) -> &(dyn Any + 'static);
// Provided method
fn selection(&self) -> Option<TextSelection> { ... }
}Available on crate feature
prelude only.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".