Struct NumericConstant

Source
#[repr(transparent)]
pub struct NumericConstant<T>(pub T);
Expand description

This is required to allow NumericArray to be operated on by both other NumericArray instances and constants, with generic types, because some type U supercedes NumericArray<U, N>

As a result, constants must be wrapped in this totally transparent wrapper type to differentiate the types to Rust.

Tuple Fields§

§0: T

Trait Implementations§

Source§

impl<'a, T: Clone, U, N: ArrayLength> Add<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Add<T> + Clone,

Source§

type Output = NumericArray<<U as Add<T>>::Output, N>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U, N: ArrayLength> Add<NumericArray<T, N>> for NumericConstant<U>
where U: Add<T> + Clone,

Source§

type Output = NumericArray<<U as Add<T>>::Output, N>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Add<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Add<U> + Clone,

Source§

type Output = NumericArray<<T as Add<U>>::Output, N>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Add<NumericConstant<U>> for NumericArray<T, N>
where T: Add<U>,

Source§

type Output = NumericArray<<T as Add<U>>::Output, N>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> AddAssign<NumericConstant<U>> for NumericArray<T, N>
where T: AddAssign<U>,

Source§

fn add_assign(&mut self, rhs: NumericConstant<U>)

Performs the += operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> BitAnd<&'a NumericArray<T, N>> for NumericConstant<U>
where U: BitAnd<T> + Clone,

Source§

type Output = NumericArray<<U as BitAnd<T>>::Output, N>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T, U, N: ArrayLength> BitAnd<NumericArray<T, N>> for NumericConstant<U>
where U: BitAnd<T> + Clone,

Source§

type Output = NumericArray<<U as BitAnd<T>>::Output, N>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the & operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> BitAnd<NumericConstant<U>> for &'a NumericArray<T, N>
where T: BitAnd<U> + Clone,

Source§

type Output = NumericArray<<T as BitAnd<U>>::Output, N>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NumericConstant<U>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitAnd<NumericConstant<U>> for NumericArray<T, N>
where T: BitAnd<U>,

Source§

type Output = NumericArray<<T as BitAnd<U>>::Output, N>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NumericConstant<U>) -> Self::Output

Performs the & operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitAndAssign<NumericConstant<U>> for NumericArray<T, N>
where T: BitAndAssign<U>,

Source§

fn bitand_assign(&mut self, rhs: NumericConstant<U>)

Performs the &= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> BitOr<&'a NumericArray<T, N>> for NumericConstant<U>
where U: BitOr<T> + Clone,

Source§

type Output = NumericArray<<U as BitOr<T>>::Output, N>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T, U, N: ArrayLength> BitOr<NumericArray<T, N>> for NumericConstant<U>
where U: BitOr<T> + Clone,

Source§

type Output = NumericArray<<U as BitOr<T>>::Output, N>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the | operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> BitOr<NumericConstant<U>> for &'a NumericArray<T, N>
where T: BitOr<U> + Clone,

Source§

type Output = NumericArray<<T as BitOr<U>>::Output, N>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NumericConstant<U>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitOr<NumericConstant<U>> for NumericArray<T, N>
where T: BitOr<U>,

Source§

type Output = NumericArray<<T as BitOr<U>>::Output, N>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NumericConstant<U>) -> Self::Output

Performs the | operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitOrAssign<NumericConstant<U>> for NumericArray<T, N>
where T: BitOrAssign<U>,

Source§

fn bitor_assign(&mut self, rhs: NumericConstant<U>)

Performs the |= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> BitXor<&'a NumericArray<T, N>> for NumericConstant<U>
where U: BitXor<T> + Clone,

Source§

type Output = NumericArray<<U as BitXor<T>>::Output, N>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T, U, N: ArrayLength> BitXor<NumericArray<T, N>> for NumericConstant<U>
where U: BitXor<T> + Clone,

Source§

type Output = NumericArray<<U as BitXor<T>>::Output, N>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> BitXor<NumericConstant<U>> for &'a NumericArray<T, N>
where T: BitXor<U> + Clone,

Source§

type Output = NumericArray<<T as BitXor<U>>::Output, N>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: NumericConstant<U>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitXor<NumericConstant<U>> for NumericArray<T, N>
where T: BitXor<U>,

Source§

type Output = NumericArray<<T as BitXor<U>>::Output, N>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: NumericConstant<U>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> BitXorAssign<NumericConstant<U>> for NumericArray<T, N>
where T: BitXorAssign<U>,

Source§

fn bitxor_assign(&mut self, rhs: NumericConstant<U>)

Performs the ^= operation. Read more
Source§

impl<T: Clone> Clone for NumericConstant<T>

Source§

fn clone(&self) -> NumericConstant<T>

Returns a copy 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<T: Debug> Debug for NumericConstant<T>

Source§

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

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

impl<T> Deref for NumericConstant<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &T

Dereferences the value.
Source§

impl<T> DerefMut for NumericConstant<T>

Source§

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

Mutably dereferences the value.
Source§

impl<'a, T: Clone, U, N: ArrayLength> Div<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Div<T> + Clone,

Source§

type Output = NumericArray<<U as Div<T>>::Output, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U, N: ArrayLength> Div<NumericArray<T, N>> for NumericConstant<U>
where U: Div<T> + Clone,

Source§

type Output = NumericArray<<U as Div<T>>::Output, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Div<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Div<U> + Clone,

Source§

type Output = NumericArray<<T as Div<U>>::Output, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: NumericConstant<U>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Div<NumericConstant<U>> for NumericArray<T, N>
where T: Div<U>,

Source§

type Output = NumericArray<<T as Div<U>>::Output, N>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: NumericConstant<U>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> DivAssign<NumericConstant<U>> for NumericArray<T, N>
where T: DivAssign<U>,

Source§

fn div_assign(&mut self, rhs: NumericConstant<U>)

Performs the /= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Mul<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Mul<T> + Clone,

Source§

type Output = NumericArray<<U as Mul<T>>::Output, N>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U, N: ArrayLength> Mul<NumericArray<T, N>> for NumericConstant<U>
where U: Mul<T> + Clone,

Source§

type Output = NumericArray<<U as Mul<T>>::Output, N>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Mul<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Mul<U> + Clone,

Source§

type Output = NumericArray<<T as Mul<U>>::Output, N>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NumericConstant<U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Mul<NumericConstant<U>> for NumericArray<T, N>
where T: Mul<U>,

Source§

type Output = NumericArray<<T as Mul<U>>::Output, N>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: NumericConstant<U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> MulAssign<NumericConstant<U>> for NumericArray<T, N>
where T: MulAssign<U>,

Source§

fn mul_assign(&mut self, rhs: NumericConstant<U>)

Performs the *= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Pow<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Pow<T> + Clone,

Source§

type Output = NumericArray<<U as Pow<T>>::Output, N>

The result after applying the operator.
Source§

fn pow(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl<T, U, N: ArrayLength> Pow<NumericArray<T, N>> for NumericConstant<U>
where U: Pow<T> + Clone,

Source§

type Output = NumericArray<<U as Pow<T>>::Output, N>

The result after applying the operator.
Source§

fn pow(self, rhs: NumericArray<T, N>) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Pow<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Pow<U> + Clone,

Source§

type Output = NumericArray<<T as Pow<U>>::Output, N>

The result after applying the operator.
Source§

fn pow(self, rhs: NumericConstant<U>) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Pow<NumericConstant<U>> for NumericArray<T, N>
where T: Pow<U>,

Source§

type Output = NumericArray<<T as Pow<U>>::Output, N>

The result after applying the operator.
Source§

fn pow(self, rhs: NumericConstant<U>) -> Self::Output

Returns self to the power rhs. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Rem<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Rem<T> + Clone,

Source§

type Output = NumericArray<<U as Rem<T>>::Output, N>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, U, N: ArrayLength> Rem<NumericArray<T, N>> for NumericConstant<U>
where U: Rem<T> + Clone,

Source§

type Output = NumericArray<<U as Rem<T>>::Output, N>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Rem<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Rem<U> + Clone,

Source§

type Output = NumericArray<<T as Rem<U>>::Output, N>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: NumericConstant<U>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Rem<NumericConstant<U>> for NumericArray<T, N>
where T: Rem<U>,

Source§

type Output = NumericArray<<T as Rem<U>>::Output, N>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: NumericConstant<U>) -> Self::Output

Performs the % operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> RemAssign<NumericConstant<U>> for NumericArray<T, N>
where T: RemAssign<U>,

Source§

fn rem_assign(&mut self, rhs: NumericConstant<U>)

Performs the %= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Shl<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Shl<T> + Clone,

Source§

type Output = NumericArray<<U as Shl<T>>::Output, N>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T, U, N: ArrayLength> Shl<NumericArray<T, N>> for NumericConstant<U>
where U: Shl<T> + Clone,

Source§

type Output = NumericArray<<U as Shl<T>>::Output, N>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the << operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Shl<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Shl<U> + Clone,

Source§

type Output = NumericArray<<T as Shl<U>>::Output, N>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: NumericConstant<U>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Shl<NumericConstant<U>> for NumericArray<T, N>
where T: Shl<U>,

Source§

type Output = NumericArray<<T as Shl<U>>::Output, N>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: NumericConstant<U>) -> Self::Output

Performs the << operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> ShlAssign<NumericConstant<U>> for NumericArray<T, N>
where T: ShlAssign<U>,

Source§

fn shl_assign(&mut self, rhs: NumericConstant<U>)

Performs the <<= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Shr<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Shr<T> + Clone,

Source§

type Output = NumericArray<<U as Shr<T>>::Output, N>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T, U, N: ArrayLength> Shr<NumericArray<T, N>> for NumericConstant<U>
where U: Shr<T> + Clone,

Source§

type Output = NumericArray<<U as Shr<T>>::Output, N>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Shr<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Shr<U> + Clone,

Source§

type Output = NumericArray<<T as Shr<U>>::Output, N>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: NumericConstant<U>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Shr<NumericConstant<U>> for NumericArray<T, N>
where T: Shr<U>,

Source§

type Output = NumericArray<<T as Shr<U>>::Output, N>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: NumericConstant<U>) -> Self::Output

Performs the >> operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> ShrAssign<NumericConstant<U>> for NumericArray<T, N>
where T: ShrAssign<U>,

Source§

fn shr_assign(&mut self, rhs: NumericConstant<U>)

Performs the >>= operation. Read more
Source§

impl<'a, T: Clone, U, N: ArrayLength> Sub<&'a NumericArray<T, N>> for NumericConstant<U>
where U: Sub<T> + Clone,

Source§

type Output = NumericArray<<U as Sub<T>>::Output, N>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a NumericArray<T, N>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U, N: ArrayLength> Sub<NumericArray<T, N>> for NumericConstant<U>
where U: Sub<T> + Clone,

Source§

type Output = NumericArray<<U as Sub<T>>::Output, N>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: NumericArray<T, N>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, T, U: Clone, N: ArrayLength> Sub<NumericConstant<U>> for &'a NumericArray<T, N>
where T: Sub<U> + Clone,

Source§

type Output = NumericArray<<T as Sub<U>>::Output, N>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> Sub<NumericConstant<U>> for NumericArray<T, N>
where T: Sub<U>,

Source§

type Output = NumericArray<<T as Sub<U>>::Output, N>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T, U: Clone, N: ArrayLength> SubAssign<NumericConstant<U>> for NumericArray<T, N>
where T: SubAssign<U>,

Source§

fn sub_assign(&mut self, rhs: NumericConstant<U>)

Performs the -= operation. Read more
Source§

impl<T: Copy> Copy for NumericConstant<T>

Auto Trait Implementations§

§

impl<T> Freeze for NumericConstant<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for NumericConstant<T>
where T: RefUnwindSafe,

§

impl<T> Send for NumericConstant<T>
where T: Send,

§

impl<T> Sync for NumericConstant<T>
where T: Sync,

§

impl<T> Unpin for NumericConstant<T>
where T: Unpin,

§

impl<T> UnwindSafe for NumericConstant<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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, 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, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,