[−][src]Struct direction::Coord
General purpose coordinate
Fields
x: i32
y: i32
Methods
impl Coord
[src]
impl Coord
pub fn new(x: i32, y: i32) -> Coord | [src] |
pub fn from_size(size: Size) -> Result<Coord, DimensionTooLargeForCoord> | [src] |
pub fn to_size(self) -> Result<Size, NegativeDimension> | [src] |
pub fn normalize(self, size: Size) -> Coord | [src] |
pub fn is_valid(self, size: Size) -> bool | [src] |
pub fn get(self, axis: Axis) -> i32 | [src] |
pub fn get_mut(&mut self, axis: Axis) -> &mut i32 | [src] |
pub fn set(self, axis: Axis, value: i32) -> Coord | [src] |
pub fn set_in_place(&mut self, axis: Axis, value: i32) | [src] |
pub fn new_axis(this_axis: i32, other_axis: i32, axis: Axis) -> Coord | [src] |
pub fn get_static<A>(self) -> i32 where | [src] |
pub fn get_static_mut<A>(&mut self) -> &mut i32 where | [src] |
pub fn set_static<A>(self, value: i32) -> Coord where | [src] |
pub fn set_static_in_place<A>(&mut self, value: i32) where | [src] |
pub fn new_static_axis<A>(this_axis: i32, other_axis: i32) -> Coord where | [src] |
Trait Implementations
impl PartialOrd<Coord> for Coord
[src]
impl PartialOrd<Coord> for Coord
fn partial_cmp(&self, other: &Coord) -> Option<Ordering> | [src] |
fn lt(&self, other: &Coord) -> bool | [src] |
fn le(&self, other: &Coord) -> bool | [src] |
fn gt(&self, other: &Coord) -> bool | [src] |
fn ge(&self, other: &Coord) -> bool | [src] |
impl Hash for Coord
[src]
impl Hash for Coord
fn hash<__H>(&self, state: &mut __H) where | [src] |
fn hash_slice<H>(data: &[Self], state: &mut H) where | 1.3.0 [src] |
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for Coord
[src]
impl Copy for Coord
impl Debug for Coord
[src]
impl Debug for Coord
impl Div<i32> for Coord
[src]
impl Div<i32> for Coord
type Output = Coord
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> <Coord as Div<i32>>::Output | [src] |
impl<'a> Div<i32> for &'a Coord
[src]
impl<'a> Div<i32> for &'a Coord
type Output = Coord
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> <&'a Coord as Div<i32>>::Output | [src] |
impl<T> AddAssign<T> for Coord where
Coord: Add<T>,
<Coord as Add<T>>::Output == Coord,
[src]
impl<T> AddAssign<T> for Coord where
Coord: Add<T>,
<Coord as Add<T>>::Output == Coord,
fn add_assign(&mut self, rhs: T) | [src] |
impl Clone for Coord
[src]
impl Clone for Coord
fn clone(&self) -> Coord | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Default for Coord
[src]
impl Default for Coord
impl<'a, 'b> Add<&'a Size> for &'b Coord
[src]
impl<'a, 'b> Add<&'a Size> for &'b Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: &'a Size) -> <&'b Coord as Add<&'a Size>>::Output | [src] |
impl Add<Size> for Coord
[src]
impl Add<Size> for Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: Size) -> <Coord as Add<Size>>::Output | [src] |
impl<'a> Add<Coord> for &'a Coord
[src]
impl<'a> Add<Coord> for &'a Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <&'a Coord as Add<Coord>>::Output | [src] |
impl<'a> Add<&'a Coord> for Coord
[src]
impl<'a> Add<&'a Coord> for Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <Coord as Add<&'a Coord>>::Output | [src] |
impl Add<Coord> for Coord
[src]
impl Add<Coord> for Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, Coord) -> <Coord as Add<Coord>>::Output | [src] |
impl<'a> Add<Size> for &'a Coord
[src]
impl<'a> Add<Size> for &'a Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: Size) -> <&'a Coord as Add<Size>>::Output | [src] |
impl<'a, 'b> Add<&'a Coord> for &'b Coord
[src]
impl<'a, 'b> Add<&'a Coord> for &'b Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, &'a Coord) -> <&'b Coord as Add<&'a Coord>>::Output | [src] |
impl<'a> Add<&'a Size> for Coord
[src]
impl<'a> Add<&'a Size> for Coord
type Output = Coord
The resulting type after applying the +
operator.
fn add(self, size: &'a Size) -> <Coord as Add<&'a Size>>::Output | [src] |
impl Ord for Coord
[src]
impl Ord for Coord
fn cmp(&self, other: &Coord) -> Ordering | [src] |
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
impl Eq for Coord
[src]
impl Eq for Coord
impl PartialEq<Coord> for Coord
[src]
impl PartialEq<Coord> for Coord
impl Sub<Size> for Coord
[src]
impl Sub<Size> for Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: Size) -> <Coord as Sub<Size>>::Output | [src] |
impl Sub<Coord> for Coord
[src]
impl Sub<Coord> for Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <Coord as Sub<Coord>>::Output | [src] |
impl<'a, 'b> Sub<&'a Size> for &'b Coord
[src]
impl<'a, 'b> Sub<&'a Size> for &'b Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: &'a Size) -> <&'b Coord as Sub<&'a Size>>::Output | [src] |
impl<'a> Sub<&'a Coord> for Coord
[src]
impl<'a> Sub<&'a Coord> for Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <Coord as Sub<&'a Coord>>::Output | [src] |
impl<'a> Sub<Size> for &'a Coord
[src]
impl<'a> Sub<Size> for &'a Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: Size) -> <&'a Coord as Sub<Size>>::Output | [src] |
impl<'a> Sub<&'a Size> for Coord
[src]
impl<'a> Sub<&'a Size> for Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, size: &'a Size) -> <Coord as Sub<&'a Size>>::Output | [src] |
impl<'a> Sub<Coord> for &'a Coord
[src]
impl<'a> Sub<Coord> for &'a Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, Coord) -> <&'a Coord as Sub<Coord>>::Output | [src] |
impl<'a, 'b> Sub<&'a Coord> for &'b Coord
[src]
impl<'a, 'b> Sub<&'a Coord> for &'b Coord
type Output = Coord
The resulting type after applying the -
operator.
fn sub(self, &'a Coord) -> <&'b Coord as Sub<&'a Coord>>::Output | [src] |
impl<T> MulAssign<T> for Coord where
Coord: Mul<T>,
<Coord as Mul<T>>::Output == Coord,
[src]
impl<T> MulAssign<T> for Coord where
Coord: Mul<T>,
<Coord as Mul<T>>::Output == Coord,
fn mul_assign(&mut self, rhs: T) | [src] |
impl<T> SubAssign<T> for Coord where
Coord: Sub<T>,
<Coord as Sub<T>>::Output == Coord,
[src]
impl<T> SubAssign<T> for Coord where
Coord: Sub<T>,
<Coord as Sub<T>>::Output == Coord,
fn sub_assign(&mut self, rhs: T) | [src] |
impl Mul<i32> for Coord
[src]
impl Mul<i32> for Coord
type Output = Coord
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> <Coord as Mul<i32>>::Output | [src] |
impl<'a> Mul<i32> for &'a Coord
[src]
impl<'a> Mul<i32> for &'a Coord
type Output = Coord
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> <&'a Coord as Mul<i32>>::Output | [src] |
impl From<(i32, i32)> for Coord
[src]
impl From<(i32, i32)> for Coord
impl From<[i32; 2]> for Coord
[src]
impl From<[i32; 2]> for Coord
impl<T> DivAssign<T> for Coord where
Coord: Div<T>,
<Coord as Div<T>>::Output == Coord,
[src]
impl<T> DivAssign<T> for Coord where
Coord: Div<T>,
<Coord as Div<T>>::Output == Coord,
fn div_assign(&mut self, rhs: T) | [src] |
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |