Skip to main content

HasSelectionData

Trait HasSelectionData 

Source
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§

Source

fn as_any(&self) -> &(dyn Any + 'static)

return self as Any

Provided Methods§

Source

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§