pub struct PosXY<Val> {
pub x: Val,
pub y: Val,
}
Fields§
§x: Val
§y: Val
Implementations§
source§impl<Val: Int> PosXY<Val>
impl<Val: Int> PosXY<Val>
pub const fn new(x: Val, y: Val) -> Self
pub const ZERO: Self = _
pub const MIN: Self = _
pub const MAX: Self = _
pub fn left(self, num: Val) -> NumResult<Self>
pub fn right(self, num: Val) -> NumResult<Self>
pub fn down(self, num: Val) -> NumResult<Self>
pub fn up(self, num: Val) -> NumResult<Self>
Trait Implementations§
source§impl<Val, ArgVal: Int> Add<PosXY<ArgVal>> for PosXY<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> Add<PosXY<ArgVal>> for PosXY<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> AddAssign<PosXY<ArgVal>> for PosXY<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> AddAssign<PosXY<ArgVal>> for PosXY<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§fn add_assign(&mut self, other: PosXY<ArgVal>)
fn add_assign(&mut self, other: PosXY<ArgVal>)
Performs the
+=
operation. Read moresource§impl<Val: Ord> Ord for PosXY<Val>
impl<Val: Ord> Ord for PosXY<Val>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Val: PartialEq> PartialEq<PosXY<Val>> for PosXY<Val>
impl<Val: PartialEq> PartialEq<PosXY<Val>> for PosXY<Val>
source§impl<Val: PartialOrd> PartialOrd<PosXY<Val>> for PosXY<Val>
impl<Val: PartialOrd> PartialOrd<PosXY<Val>> for PosXY<Val>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<Val, ArgVal: Int> Sub<PosXY<ArgVal>> for PosXY<Val>where
Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> Sub<PosXY<ArgVal>> for PosXY<Val>where Val: TrySub<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> TryAdd<PosXY<ArgVal>> for PosXY<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> TryAdd<PosXY<ArgVal>> for PosXY<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> TrySub<PosXY<ArgVal>> for PosXY<Val>where
Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> TrySub<PosXY<ArgVal>> for PosXY<Val>where Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val: Copy> Copy for PosXY<Val>
impl<Val: Eq> Eq for PosXY<Val>
impl<Val> StructuralEq for PosXY<Val>
impl<Val> StructuralPartialEq for PosXY<Val>
Auto Trait Implementations§
impl<Val> RefUnwindSafe for PosXY<Val>where Val: RefUnwindSafe,
impl<Val> Send for PosXY<Val>where Val: Send,
impl<Val> Sync for PosXY<Val>where Val: Sync,
impl<Val> Unpin for PosXY<Val>where Val: Unpin,
impl<Val> UnwindSafe for PosXY<Val>where Val: UnwindSafe,
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