pub struct PosXYZ<Val> {
pub x: Val,
pub y: Val,
pub z: Val,
}
Fields§
§x: Val
§y: Val
§z: Val
Implementations§
source§impl<Val: Int> PosXYZ<Val>
impl<Val: Int> PosXYZ<Val>
pub const fn new(x: Val, y: Val, z: 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>
pub fn behind(self, num: Val) -> NumResult<Self>
pub fn ahead(self, num: Val) -> NumResult<Self>
Trait Implementations§
source§impl<Val, ArgVal: Int> Add<PosXYZ<ArgVal>> for PosXYZ<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> Add<PosXYZ<ArgVal>> for PosXYZ<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> AddAssign<PosXYZ<ArgVal>> for PosXYZ<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> AddAssign<PosXYZ<ArgVal>> for PosXYZ<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§fn add_assign(&mut self, other: PosXYZ<ArgVal>)
fn add_assign(&mut self, other: PosXYZ<ArgVal>)
Performs the
+=
operation. Read moresource§impl<Val: Ord> Ord for PosXYZ<Val>
impl<Val: Ord> Ord for PosXYZ<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<PosXYZ<Val>> for PosXYZ<Val>
impl<Val: PartialEq> PartialEq<PosXYZ<Val>> for PosXYZ<Val>
source§impl<Val: PartialOrd> PartialOrd<PosXYZ<Val>> for PosXYZ<Val>
impl<Val: PartialOrd> PartialOrd<PosXYZ<Val>> for PosXYZ<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<PosXYZ<ArgVal>> for PosXYZ<Val>where
Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> Sub<PosXYZ<ArgVal>> for PosXYZ<Val>where Val: TrySub<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> TryAdd<PosXYZ<ArgVal>> for PosXYZ<Val>where
Val: TryAdd<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> TryAdd<PosXYZ<ArgVal>> for PosXYZ<Val>where Val: TryAdd<ArgVal, Output = Val> + Int,
source§impl<Val, ArgVal: Int> TrySub<PosXYZ<ArgVal>> for PosXYZ<Val>where
Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val, ArgVal: Int> TrySub<PosXYZ<ArgVal>> for PosXYZ<Val>where Val: TrySub<ArgVal, Output = Val> + Int,
impl<Val: Copy> Copy for PosXYZ<Val>
impl<Val: Eq> Eq for PosXYZ<Val>
impl<Val> StructuralEq for PosXYZ<Val>
impl<Val> StructuralPartialEq for PosXYZ<Val>
Auto Trait Implementations§
impl<Val> RefUnwindSafe for PosXYZ<Val>where Val: RefUnwindSafe,
impl<Val> Send for PosXYZ<Val>where Val: Send,
impl<Val> Sync for PosXYZ<Val>where Val: Sync,
impl<Val> Unpin for PosXYZ<Val>where Val: Unpin,
impl<Val> UnwindSafe for PosXYZ<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