Vector

Struct Vector 

Source
pub struct Vector<const C: usize, T> {
    pub values: [T; C],
}

Fields§

§values: [T; C]

Implementations§

Source§

impl<const C: usize, T> Vector<C, T>

Source

pub const fn new(values: [T; C]) -> Self

Source§

impl<const C: usize, T> Vector<C, T>
where T: Copy,

Source

pub fn all(value: T) -> Self

Source

pub fn elementwise_unary<F: Fn(T) -> T>(&self, f: F) -> Self

Source

pub fn aggregate<F: Fn(T, T) -> T>(&self, f: F) -> T

Source

pub fn elementwise_binary<F: Fn(T, T) -> T>(&self, rhs: Self, f: F) -> Self

Source§

impl<const C: usize, T> Vector<C, T>
where T: Copy + Ord,

Source

pub fn elementwise_min(&self, rhs: Self) -> Self

Source

pub fn elementwise_max(&self, rhs: Self) -> Self

Source§

impl<const C: usize, T> Vector<C, T>
where T: Copy + Add<Output = T> + Mul<Output = T>,

Source

pub fn inner(&self, rhs: Self) -> T

Source§

impl Vector<2, i32>

Source

pub fn winding(&self, rhs: Self) -> i32

Source

pub fn perp(&self) -> Self

Source§

impl<const C: usize> Vector<C, f32>

Source

pub fn magn(&self) -> f32

Source

pub fn normalized(&self) -> Self

Source§

impl<T: Copy> Vector<2, T>

Source

pub const fn from_xy(x: T, y: T) -> Self

Source

pub fn x(&self) -> T

Source

pub fn y(&self) -> T

Source§

impl Vector<2, usize>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, isize>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, i128>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, i64>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, i32>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, i16>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, i8>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, u128>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, u64>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, u32>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, u16>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl Vector<2, u8>

Source

pub const ZERO: Self

Source

pub const ONE: Self

Source

pub const X: Self

Source

pub const Y: Self

Source§

impl<T: Copy> Vector<3, T>

Source

pub const fn from_xyz(x: T, y: T, z: T) -> Self

Source

pub fn x(&self) -> T

Source

pub fn y(&self) -> T

Source

pub fn z(&self) -> T

Source§

impl<T: Copy> Vector<4, T>

Source

pub const fn from_xyzw(x: T, y: T, z: T, w: T) -> Self

Source

pub fn x(&self) -> T

Source

pub fn y(&self) -> T

Source

pub fn z(&self) -> T

Source

pub fn w(&self) -> T

Trait Implementations§

Source§

impl<const C: usize, T: Add<Output = T> + Copy> Add for Vector<C, T>

Source§

type Output = Vector<C, T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<const C: usize, T: AddAssign + Copy> AddAssign for Vector<C, T>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<const C: usize, T: Clone> Clone for Vector<C, T>

Source§

fn clone(&self) -> Vector<C, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const C: usize, T: Ord + Copy> CoverObject<Vector<C, T>> for Aabb<C, T>

Source§

fn cover(&mut self, point: &Vector<C, T>)

Source§

impl<const C: usize, T: Debug> Debug for Vector<C, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, const C: usize, T: Deserialize<'de>> Deserialize<'de> for Vector<C, T>

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<const C: usize, T: Display> Display for Vector<C, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const C: usize, T> EuclideanDistanceSquared<Vector<C, T>, T> for Vector<C, T>
where T: Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T>,

Source§

fn euclidean_distance_squared(&self, other: &Self) -> T

Source§

impl<const C: usize> From<Vector<C, f32>> for Vector<C, f64>

Source§

fn from(value: Vector<C, f32>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i16>> for Vector<C, i128>

Source§

fn from(value: Vector<C, i16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i16>> for Vector<C, i32>

Source§

fn from(value: Vector<C, i16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i16>> for Vector<C, i64>

Source§

fn from(value: Vector<C, i16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i32>> for Vector<C, i128>

Source§

fn from(value: Vector<C, i32>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i32>> for Vector<C, i64>

Source§

fn from(value: Vector<C, i32>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i64>> for Vector<C, i128>

Source§

fn from(value: Vector<C, i64>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i8>> for Vector<C, i128>

Source§

fn from(value: Vector<C, i8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i8>> for Vector<C, i16>

Source§

fn from(value: Vector<C, i8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i8>> for Vector<C, i32>

Source§

fn from(value: Vector<C, i8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, i8>> for Vector<C, i64>

Source§

fn from(value: Vector<C, i8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u16>> for Vector<C, u128>

Source§

fn from(value: Vector<C, u16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u16>> for Vector<C, u32>

Source§

fn from(value: Vector<C, u16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u16>> for Vector<C, u64>

Source§

fn from(value: Vector<C, u16>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u32>> for Vector<C, u128>

Source§

fn from(value: Vector<C, u32>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u32>> for Vector<C, u64>

Source§

fn from(value: Vector<C, u32>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u64>> for Vector<C, u128>

Source§

fn from(value: Vector<C, u64>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u8>> for Vector<C, u128>

Source§

fn from(value: Vector<C, u8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u8>> for Vector<C, u16>

Source§

fn from(value: Vector<C, u8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u8>> for Vector<C, u32>

Source§

fn from(value: Vector<C, u8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize> From<Vector<C, u8>> for Vector<C, u64>

Source§

fn from(value: Vector<C, u8>) -> Self

Converts to this type from the input type.
Source§

impl<const C: usize, T: FromStr + Debug> FromStr for Vector<C, T>

Source§

type Err = ()

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<const C: usize, T: Hash> Hash for Vector<C, T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const C: usize, T: Copy> Index<Vector<C, i32>> for ArrayNd<C, T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: Vector<C, i32>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<const C: usize> IterateNeighbours<()> for Vector<C, i32>

Source§

fn neighbours(&self, _context: &()) -> Vec<Self>

Source§

impl<const C: usize> IterateNeighbours<()> for Vector<C, usize>

Source§

fn neighbours(&self, _context: &()) -> Vec<Self>

Source§

impl<const N: usize> LinearIndex<Vector<N, i128>> for Vector<N, i128>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, i16>> for Vector<N, i16>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize, T> LinearIndex<Vector<N, i32>> for ArrayNd<N, T>

Source§

fn index_unchecked(&self, i: Vector<N, i32>) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Vector<N, i32>>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Vector<N, i32>) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, i32>> for Vector<N, i32>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, i64>> for Vector<N, i64>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, i8>> for Vector<N, i8>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, isize>> for Vector<N, isize>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, u128>> for Vector<N, u128>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, u16>> for Vector<N, u16>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, u32>> for Vector<N, u32>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, u64>> for Vector<N, u64>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, u8>> for Vector<N, u8>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize, T> LinearIndex<Vector<N, usize>> for ArrayNd<N, T>

Source§

fn index_unchecked(&self, i: Vector<N, usize>) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Vector<N, usize>>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Vector<N, usize>) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const N: usize> LinearIndex<Vector<N, usize>> for Vector<N, usize>

Source§

fn index_unchecked(&self, i: Self) -> Option<usize>

Source§

fn unindex(&self, i: usize) -> Option<Self>

Source§

unsafe fn cardinality(&self) -> Option<usize>

👎Deprecated
This is unsafe and should not be called as overflows are not checked. Uses Iterator::product Read more
Source§

fn is_in_bounds(&self, i: &Self) -> bool

Source§

fn index(&self, i: I) -> Option<usize>

Source§

impl<const C: usize, T> ManhattanDistance<Vector<C, T>, T> for Vector<C, T>
where T: Copy + Add<Output = T> + Sub<Output = T> + AbsoluteValue,

Source§

fn manhattan_distance(&self, other: &Self) -> T

Source§

impl<const C: usize, T: Copy + ModularAdd> ModularAdd for Vector<C, T>

Source§

fn add_n(&self, rhs: Self, n: Self) -> Self

Source§

impl<const C: usize, T: Copy + ModularAddAssign> ModularAddAssign for Vector<C, T>

Source§

fn addassign_n(&mut self, rhs: Self, n: Self)

Source§

impl<const C: usize, T> ModularDecompose<Vector<C, T>> for Vector<C, T>
where T: ModularDecompose<T> + Copy,

Source§

fn modular_decompose(&self, n: Self) -> (Self, Self)

Source§

fn mod_n(&self, n: T) -> T

Source§

impl<const C: usize, T: Copy + ModularSub> ModularSub for Vector<C, T>

Source§

fn sub_n(&self, rhs: Self, n: Self) -> Self

Source§

impl<const C: usize, T: Copy + ModularSubAssign> ModularSubAssign for Vector<C, T>

Source§

fn subassign_n(&mut self, rhs: Self, n: Self)

Source§

impl<const C: usize, T> Mul<T> for Vector<C, T>
where T: Mul<Output = T> + Copy,

Source§

type Output = Vector<C, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Copy + Default + Add<Output = T> + Sub<Output = T> + Mul<Output = T>> Mul<Vector<3, T>> for Multivector3<T>

Source§

type Output = Multivector3<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: V3<T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const C: usize, T> Mul<Vector<C, T>> for Scalar<T>
where T: Copy + Mul<T, Output = T>,

Source§

type Output = Vector<C, T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vector<C, T>) -> Self::Output

Performs the * operation. Read more
Source§

impl<const C: usize, T: MulAssign + Copy> MulAssign<T> for Vector<C, T>

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<const C: usize, T: PartialEq> PartialEq for Vector<C, T>

Source§

fn eq(&self, other: &Vector<C, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const C: usize, T: Serialize> Serialize for Vector<C, T>

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<const C: usize, T: Sub<Output = T> + Copy> Sub for Vector<C, T>

Source§

type Output = Vector<C, T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<const C: usize, T: SubAssign + Copy> SubAssign for Vector<C, T>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<const C: usize> TryFrom<Vector<C, i128>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<i128>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i128>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i128>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<i128>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i128>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i16>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<i16>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i16>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i32>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<i32>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i32>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i64>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<i64>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i64>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i64>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<i64>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i64>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, i8>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<i8>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, i8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, isize>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<isize>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, isize>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, isize>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<isize>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, isize>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u128>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<u128>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u128>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u128>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<u128>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u128>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u16>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<u16>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u16>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u16>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<u16>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u16>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u32>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<u32>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u32>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u32>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<u32>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u32>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u64>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u64>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u64>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u64>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u8>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<u8>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, u8>> for Vector<C, usize>

Source§

type Error = <usize as TryFrom<u8>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize> TryFrom<Vector<C, usize>> for Vector<C, i32>

Source§

type Error = <i32 as TryFrom<usize>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vector<C, usize>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const C: usize, T: Copy> Copy for Vector<C, T>

Source§

impl<const C: usize, T: Eq> Eq for Vector<C, T>

Source§

impl<const C: usize, T> StructuralPartialEq for Vector<C, T>

Auto Trait Implementations§

§

impl<const C: usize, T> Freeze for Vector<C, T>
where T: Freeze,

§

impl<const C: usize, T> RefUnwindSafe for Vector<C, T>
where T: RefUnwindSafe,

§

impl<const C: usize, T> Send for Vector<C, T>
where T: Send,

§

impl<const C: usize, T> Sync for Vector<C, T>
where T: Sync,

§

impl<const C: usize, T> Unpin for Vector<C, T>
where T: Unpin,

§

impl<const C: usize, T> UnwindSafe for Vector<C, T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<const C: usize, T, U> IterateNeighbours<ArrayNd<C, U>> for T
where T: IterateNeighbours<()> + Copy, ArrayNd<C, U>: LinearIndex<T>,

Source§

fn neighbours(&self, _context: &ArrayNd<C, U>) -> Vec<T>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,