Struct direction::Coord
[−]
[src]
pub struct Coord { pub x: i32, pub y: i32, }
General purpose coordinate
Fields
x: i32
y: i32
Methods
impl Coord
[src]
Trait Implementations
impl<'a> Sub<&'a Coord> for Size
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <Size as Sub<&'a Coord>>::Output
[src]
Performs the -
operation.
impl Sub<Coord> for Size
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <Size as Sub<Coord>>::Output
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'a Coord> for &'b Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <&'b Coord as Sub<&'a Coord>>::Output
[src]
Performs the -
operation.
impl Sub<Size> for Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: Size) -> <Coord as Sub<Size>>::Output
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'a Size> for &'b Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: &'a Size) -> <&'b Coord as Sub<&'a Size>>::Output
[src]
Performs the -
operation.
impl Sub<Coord> for Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <Coord as Sub<Coord>>::Output
[src]
Performs the -
operation.
impl<'a, 'b> Sub<&'a Coord> for &'b Size
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <&'b Size as Sub<&'a Coord>>::Output
[src]
Performs the -
operation.
impl<'a> Sub<&'a Size> for Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: &'a Size) -> <Coord as Sub<&'a Size>>::Output
[src]
Performs the -
operation.
impl<'a> Sub<Coord> for &'a Size
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <&'a Size as Sub<Coord>>::Output
[src]
Performs the -
operation.
impl<'a> Sub<&'a Coord> for Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <Coord as Sub<&'a Coord>>::Output
[src]
Performs the -
operation.
impl<'a> Sub<Size> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: Size) -> <&'a Coord as Sub<Size>>::Output
[src]
Performs the -
operation.
impl<'a> Sub<Coord> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <&'a Coord as Sub<Coord>>::Output
[src]
Performs the -
operation.
impl Mul<i32> for Coord
[src]
type Output = Coord
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> <Coord as Mul<i32>>::Output
[src]
Performs the *
operation.
impl<'a> Mul<i32> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> <&'a Coord as Mul<i32>>::Output
[src]
Performs the *
operation.
impl Copy for Coord
[src]
impl<T> SubAssign<T> for Coord where
Coord: Sub<T>,
<Coord as Sub<T>>::Output == Coord,
[src]
Coord: Sub<T>,
<Coord as Sub<T>>::Output == Coord,
fn sub_assign(&mut self, rhs: T)
[src]
Performs the -=
operation.
impl<'a> Div<i32> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> <&'a Coord as Div<i32>>::Output
[src]
Performs the /
operation.
impl Div<i32> for Coord
[src]
type Output = Coord
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> <Coord as Div<i32>>::Output
[src]
Performs the /
operation.
impl<T> AddAssign<T> for Coord where
Coord: Add<T>,
<Coord as Add<T>>::Output == Coord,
[src]
Coord: Add<T>,
<Coord as Add<T>>::Output == Coord,
fn add_assign(&mut self, rhs: T)
[src]
Performs the +=
operation.
impl<'de> Deserialize<'de> for Coord
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Coord, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Coord, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Coord
[src]
impl Hash for Coord
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
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
impl<T> DivAssign<T> for Coord where
Coord: Div<T>,
<Coord as Div<T>>::Output == Coord,
[src]
Coord: Div<T>,
<Coord as Div<T>>::Output == Coord,
fn div_assign(&mut self, rhs: T)
[src]
Performs the /=
operation.
impl PartialEq<Coord> for Coord
[src]
fn eq(&self, __arg_0: &Coord) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Coord) -> bool
[src]
This method tests for !=
.
impl<T> MulAssign<T> for Coord where
Coord: Mul<T>,
<Coord as Mul<T>>::Output == Coord,
[src]
Coord: Mul<T>,
<Coord as Mul<T>>::Output == Coord,
fn mul_assign(&mut self, rhs: T)
[src]
Performs the *=
operation.
impl Serialize for Coord
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&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
impl From<(i32, i32)> for Coord
[src]
impl From<[i32; 2]> for Coord
[src]
impl Add<Coord> for Size
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <Size as Add<Coord>>::Output
[src]
Performs the +
operation.
impl<'a> Add<Coord> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <&'a Coord as Add<Coord>>::Output
[src]
Performs the +
operation.
impl<'a> Add<&'a Coord> for Size
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <Size as Add<&'a Coord>>::Output
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'a Size> for &'b Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: &'a Size) -> <&'b Coord as Add<&'a Size>>::Output
[src]
Performs the +
operation.
impl Add<Size> for Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: Size) -> <Coord as Add<Size>>::Output
[src]
Performs the +
operation.
impl<'a> Add<Coord> for &'a Size
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <&'a Size as Add<Coord>>::Output
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'a Coord> for &'b Size
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <&'b Size as Add<&'a Coord>>::Output
[src]
Performs the +
operation.
impl<'a, 'b> Add<&'a Coord> for &'b Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <&'b Coord as Add<&'a Coord>>::Output
[src]
Performs the +
operation.
impl<'a> Add<&'a Coord> for Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <Coord as Add<&'a Coord>>::Output
[src]
Performs the +
operation.
impl<'a> Add<&'a Size> for Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: &'a Size) -> <Coord as Add<&'a Size>>::Output
[src]
Performs the +
operation.
impl Add<Coord> for Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <Coord as Add<Coord>>::Output
[src]
Performs the +
operation.
impl<'a> Add<Size> for &'a Coord
[src]
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: Size) -> <&'a Coord as Add<Size>>::Output
[src]
Performs the +
operation.
impl Clone for Coord
[src]
fn clone(&self) -> Coord
[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 Debug for Coord
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more