pub struct PointN<T, const N: usize>(/* private fields */);
Expand description
Point with dimensions of constant generic size N and of generic type T (Implemented as Newtype Pattern on an array see book or https://www.worthe-it.co.za/blog/2020-10-31-newtype-pattern-in-rust.html) This type only interacts with the library through the point trait, so you are free to use your own Point/Coord/Vec structures instead by implementing the (small) trait
Implementations§
Trait Implementations§
Source§impl<T, const N: usize> Add<T> for PointN<T, N>
This is not required by the Point trait or library but
convenient if you want to use the type externally
impl<T, const N: usize> Add<T> for PointN<T, N>
This is not required by the Point trait or library but convenient if you want to use the type externally
Source§impl<T: Default + Copy, const N: usize> Default for PointN<T, N>
Initialize with the Default value for the underlying type
impl<T: Default + Copy, const N: usize> Default for PointN<T, N>
Initialize with the Default value for the underlying type
Source§impl<'a, T, const N: usize> IntoIterator for &'a mut PointN<T, N>
impl<'a, T, const N: usize> IntoIterator for &'a mut PointN<T, N>
Source§impl<T, const N: usize> IntoIterator for PointN<T, N>
impl<T, const N: usize> IntoIterator for PointN<T, N>
Source§impl<T, const N: usize> Sub<T> for PointN<T, N>
This is not required by the Point trait or library but
convenient if you want to use the type externally
impl<T, const N: usize> Sub<T> for PointN<T, N>
This is not required by the Point trait or library but convenient if you want to use the type externally
impl<T: Copy, const N: usize> Copy for PointN<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for PointN<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for PointN<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for PointN<T, N>where
T: Send,
impl<T, const N: usize> Sync for PointN<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for PointN<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for PointN<T, N>where
T: 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