pub struct SelectionData { /* private fields */ }Implementations§
Source§impl SelectionData
impl SelectionData
Sourcepub fn new(inner: impl HasSelectionData + 'static) -> Self
pub fn new(inner: impl HasSelectionData + 'static) -> Self
Create a new SelectionData
Sourcepub fn selection(&self) -> Option<TextSelection>
pub fn selection(&self) -> Option<TextSelection>
The selection inside a text control.
This is only populated for event targets that expose the text-control
selection APIs, such as input and textarea on the web. Some
selection events, notably selectstart, can also fire when selecting
normal document text. Those document selections are exposed by browser
APIs like document.getSelection() and intentionally return None here.
Trait Implementations§
Source§impl Debug for SelectionData
impl Debug for SelectionData
Source§impl<'de> Deserialize<'de> for SelectionData
Available on crate feature serialize only.
impl<'de> Deserialize<'de> for SelectionData
Available on crate feature
serialize only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PlatformEventData> for SelectionData
impl From<&PlatformEventData> for SelectionData
Source§fn from(val: &PlatformEventData) -> Self
fn from(val: &PlatformEventData) -> Self
Converts to this type from the input type.
Source§impl From<&SelectionData> for SerializedSelectionData
Available on crate feature serialize only.
impl From<&SelectionData> for SerializedSelectionData
Available on crate feature
serialize only.Source§fn from(data: &SelectionData) -> Self
fn from(data: &SelectionData) -> Self
Converts to this type from the input type.
Source§impl<E: HasSelectionData> From<E> for SelectionData
impl<E: HasSelectionData> From<E> for SelectionData
Source§impl PartialEq for SelectionData
impl PartialEq for SelectionData
Auto Trait Implementations§
impl !RefUnwindSafe for SelectionData
impl !Send for SelectionData
impl !Sync for SelectionData
impl !UnwindSafe for SelectionData
impl Freeze for SelectionData
impl Unpin for SelectionData
impl UnsafeUnpin for SelectionData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.