pub struct MouseData { /* private fields */ }
Expand description
A synthetic event that wraps a web-style MouseEvent
Data associated with a mouse event
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MouseData
impl<'de> Deserialize<'de> for MouseData
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<&MouseData> for SerializedMouseData
impl From<&MouseData> for SerializedMouseData
Source§impl From<&PlatformEventData> for MouseData
impl From<&PlatformEventData> for MouseData
Source§fn from(val: &PlatformEventData) -> Self
fn from(val: &PlatformEventData) -> Self
Converts to this type from the input type.
Source§impl<E: HasMouseData + 'static> From<E> for MouseData
impl<E: HasMouseData + 'static> From<E> for MouseData
Source§impl InteractionElementOffset for MouseData
impl InteractionElementOffset for MouseData
Source§fn element_coordinates(&self) -> ElementPoint
fn element_coordinates(&self) -> ElementPoint
Gets the coordinates of the event relative to the target element.
Source§fn coordinates(&self) -> Coordinates
fn coordinates(&self) -> Coordinates
Gets the coordinates of the event.
Source§impl InteractionLocation for MouseData
impl InteractionLocation for MouseData
Source§fn client_coordinates(&self) -> ClientPoint
fn client_coordinates(&self) -> ClientPoint
Gets the coordinates of the event relative to the browser viewport.
Source§fn page_coordinates(&self) -> PagePoint
fn page_coordinates(&self) -> PagePoint
Gets the coordinates of the event relative to the page.
Source§fn screen_coordinates(&self) -> ScreenPoint
fn screen_coordinates(&self) -> ScreenPoint
Gets the coordinates of the event relative to the screen.
Source§impl ModifiersInteraction for MouseData
impl ModifiersInteraction for MouseData
Source§impl<E: HasMouseData> PartialEq<E> for MouseData
impl<E: HasMouseData> PartialEq<E> for MouseData
Source§impl PointerInteraction for MouseData
impl PointerInteraction for MouseData
The set of mouse buttons which were held when the event occurred.
The mouse button that triggered the event
This is only guaranteed to indicate which button was pressed during events caused by pressing or releasing a button. As such, it is not reliable for events such as mouseenter, mouseleave, mouseover, mouseout, or mousemove. For example, a value of MouseButton::Primary may also indicate that no button was pressed.
Auto Trait Implementations§
impl Freeze for MouseData
impl !RefUnwindSafe for MouseData
impl !Send for MouseData
impl !Sync for MouseData
impl Unpin for MouseData
impl !UnwindSafe for MouseData
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
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.