Struct stroke::point_generic::PointN
source · pub struct PointN<T, const N: usize>(_);
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<PointN<T, N>> for PointN<T, N>where
T: Add<Output = T> + Clone + Copy,
impl<T, const N: usize> Add<PointN<T, N>> for PointN<T, N>where T: Add<Output = T> + Clone + Copy,
source§impl<T, const N: usize> Add<T> for PointN<T, N>where
T: Add<Output = T> + Clone + Copy,
impl<T, const N: usize> Add<T> for PointN<T, N>where T: Add<Output = T> + Clone + Copy,
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>
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, U> Mul<U> for PointN<T, N>where
T: Mul<U, Output = T> + Clone + Copy,
U: Clone + Copy,
impl<T, const N: usize, U> Mul<U> for PointN<T, N>where T: Mul<U, Output = T> + Clone + Copy, U: Clone + Copy,
source§impl<T, const N: usize> PartialEq<PointN<T, N>> for PointN<T, N>where
T: PartialOrd,
impl<T, const N: usize> PartialEq<PointN<T, N>> for PointN<T, N>where T: PartialOrd,
source§impl<T, const N: usize> Point for PointN<T, N>where
T: Float + Copy + Default + Add<T, Output = T> + Add<f64, Output = T> + Sub<T, Output = T> + Sub<f64, Output = T> + Mul<T, Output = T> + Mul<f64, Output = T> + Sum<f64> + From<f64> + Into<f64>,
impl<T, const N: usize> Point for PointN<T, N>where T: Float + Copy + Default + Add<T, Output = T> + Add<f64, Output = T> + Sub<T, Output = T> + Sub<f64, Output = T> + Mul<T, Output = T> + Mul<f64, Output = T> + Sum<f64> + From<f64> + Into<f64>,
source§impl<T, const N: usize> Sub<PointN<T, N>> for PointN<T, N>where
T: Sub<Output = T> + Clone + Copy,
impl<T, const N: usize> Sub<PointN<T, N>> for PointN<T, N>where T: Sub<Output = T> + Clone + Copy,
source§impl<T, const N: usize> Sub<T> for PointN<T, N>where
T: Sub<Output = T> + Clone + Copy,
impl<T, const N: usize> Sub<T> for PointN<T, N>where T: Sub<Output = T> + Clone + Copy,
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> 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