pub struct MousePosition {
pub viewport_x: f64,
pub viewport_y: f64,
pub screen_x: f64,
pub screen_y: f64,
}Expand description
Current mouse coordinates in both viewport and screen space.
Fields§
§viewport_x: f64X coordinate relative to the top-left of the viewport (CSS pixels).
viewport_y: f64Y coordinate relative to the top-left of the viewport (CSS pixels).
screen_x: f64X coordinate relative to the top-left of the screen (CSS pixels).
screen_y: f64Y coordinate relative to the top-left of the screen (CSS pixels).
Trait Implementations§
Source§impl Clone for MousePosition
impl Clone for MousePosition
Source§fn clone(&self) -> MousePosition
fn clone(&self) -> MousePosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MousePosition
impl Debug for MousePosition
Source§impl PartialEq for MousePosition
impl PartialEq for MousePosition
impl Copy for MousePosition
impl StructuralPartialEq for MousePosition
Auto Trait Implementations§
impl Freeze for MousePosition
impl RefUnwindSafe for MousePosition
impl Send for MousePosition
impl Sync for MousePosition
impl Unpin for MousePosition
impl UnwindSafe for MousePosition
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