pub struct MouseData { /* private fields */ }
Available on crate feature
html
only.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: D
) -> Result<MouseData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<MouseData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&MouseData> for SerializedMouseData
impl From<&MouseData> for SerializedMouseData
source§fn from(e: &MouseData) -> SerializedMouseData
fn from(e: &MouseData) -> SerializedMouseData
Converts to this type from the input type.
source§impl From<&PlatformEventData> for MouseData
impl From<&PlatformEventData> for MouseData
source§fn from(val: &PlatformEventData) -> MouseData
fn from(val: &PlatformEventData) -> MouseData
Converts to this type from the input type.
source§impl<E> From<E> for MouseDatawhere
E: HasMouseData + 'static,
impl<E> From<E> for MouseDatawhere
E: HasMouseData + 'static,
source§impl InteractionElementOffset for MouseData
impl InteractionElementOffset for MouseData
source§fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
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) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
Gets the coordinates of the event relative to the browser viewport.
source§fn page_coordinates(&self) -> Point2D<f64, PageSpace>
fn page_coordinates(&self) -> Point2D<f64, PageSpace>
Gets the coordinates of the event relative to the page.
source§fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
Gets the coordinates of the event relative to the screen.
source§impl ModifiersInteraction for MouseData
impl ModifiersInteraction for MouseData
source§impl<E> PartialEq<E> for MouseDatawhere
E: HasMouseData,
impl<E> PartialEq<E> for MouseDatawhere
E: HasMouseData,
source§impl PartialEq for MouseData
impl PartialEq 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.
source§impl Serialize for MouseData
impl Serialize for MouseData
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
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<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.
source§impl<Cfg> TryIntoConfig for Cfg
impl<Cfg> TryIntoConfig for Cfg
source§fn into_config(self) -> Option<Cfg>
fn into_config(self) -> Option<Cfg>
Available on crate feature
launch
only.