[][src]Struct sauron_vdom::event::Coordinate

pub struct Coordinate {
    pub client_x: i32,
    pub client_y: i32,
    pub movement_x: i32,
    pub movement_y: i32,
    pub offset_x: i32,
    pub offset_y: i32,
    pub screen_x: i32,
    pub screen_y: i32,
    pub x: i32,
    pub y: i32,
}

The coordinate of the event

Fields

client_x: i32

x component of the client https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX

client_y: i32

y component of the client https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY

movement_x: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX

movement_y: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY

offset_x: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/offsetX

offset_y: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/offsetY

screen_x: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/screenX

screen_y: i32

https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/screenY

x: i32

x component

y: i32

y component

Implementations

impl Coordinate[src]

pub fn new(x: i32, y: i32) -> Self[src]

creates a new coordinate with x and y component

pub fn x(&self) -> i32[src]

returns the x component of the coordinate

pub fn y(&self) -> i32[src]

returns the y component of the coordinate

Trait Implementations

impl Clone for Coordinate[src]

impl Copy for Coordinate[src]

impl Debug for Coordinate[src]

impl Default for Coordinate[src]

impl Eq for Coordinate[src]

impl PartialEq<Coordinate> for Coordinate[src]

impl StructuralEq for Coordinate[src]

impl StructuralPartialEq for Coordinate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.