Struct rustwlc::types::Point
[−]
[src]
#[repr(C)]pub struct Point { pub x: i32, pub y: i32, }
Represents the location of a view.
Fields
x: i32
x coordinate
y: i32
y coordinate
Methods
impl Point
[src]
fn origin() -> Point
[src]
The point defined as (0, 0).
fn new(x: i32, y: i32) -> Point
[src]
Create a new point from the given x and y coordinates.
fn from_min_coords(a: Point, b: Point) -> Point
[src]
Creates a new point with an x and y which are the smallest of the two points.
Examples:
let a = Point::new(0i32, 12i32); let b = Point::new(12i32, 0i32); assert_eq!(Point::from_min_coords(a, b), Point::new(0, 0));
fn from_max_coords(a: Point, b: Point) -> Point
[src]
Creates a new point with an x and y which are the largest of the two points.
Examples:
let a = Point::new(0i32, 12i32); let b = Point::new(12i32, 0i32); assert_eq!(Point::from_max_coords(a, b), Point::new(12i32, 12i32));
Trait Implementations
impl Debug for Point
[src]
impl Eq for Point
[src]
impl PartialEq for Point
[src]
fn eq(&self, __arg_0: &Point) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point) -> bool
[src]
This method tests for !=
.
impl Copy for Point
[src]
impl Clone for Point
[src]
fn clone(&self) -> Point
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Point
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more