Struct Array

Source
#[repr(transparent)]
pub struct Array<T, const N: usize>(pub [T; N]);

Tuple Fields§

§0: [T; N]

Implementations§

Source§

impl<T, const N: usize> Array<T, N>

Source

pub fn zip_mut_map<U>(&mut self, rhs: [U; N], op: impl Fn(&mut T, U) + Copy)

Source§

impl<T, const N: usize> Array<T, N>

Source

pub fn zip_map<U, O>(self, rhs: [U; N], op: impl FnMut(T, U) -> O) -> [O; N]

Source§

impl<T, const N: usize> Array<T, N>

Source

pub fn new_mut(a: &mut [T; N]) -> &mut Self

Trait Implementations§

Source§

impl<T, U, const N: usize> Add<[U; N]> for Array<T, N>
where T: Add<U>,

Source§

type Output = [<T as Add<U>>::Output; N]

The resulting type after applying the + operator.
Source§

fn add(self, rhs: [U; N]) -> Self::Output

Performs the + operation. Read more
Source§

impl<T, U, const N: usize> Add<Array<U, N>> for Array<T, N>
where T: Add<U>,

Source§

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

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<T, U, const N: usize> AddAssign<[U; N]> for Array<T, N>
where T: AddAssign<U>,

Source§

fn add_assign(&mut self, rhs: [U; N])

Performs the += operation. Read more
Source§

impl<T, U, const N: usize> AddAssign<Array<U, N>> for Array<T, N>
where T: AddAssign<U>,

Source§

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

Performs the += operation. Read more
Source§

impl<T, U, const N: usize> Div<[U; N]> for Array<T, N>
where T: Div<U>,

Source§

type Output = [<T as Div<U>>::Output; N]

The resulting type after applying the / operator.
Source§

fn div(self, rhs: [U; N]) -> Self::Output

Performs the / operation. Read more
Source§

impl<T, U, const N: usize> Div<Array<U, N>> for Array<T, N>
where T: Div<U>,

Source§

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

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<T, U, const N: usize> DivAssign<[U; N]> for Array<T, N>
where T: DivAssign<U>,

Source§

fn div_assign(&mut self, rhs: [U; N])

Performs the /= operation. Read more
Source§

impl<T, U, const N: usize> DivAssign<Array<U, N>> for Array<T, N>
where T: DivAssign<U>,

Source§

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

Performs the /= operation. Read more
Source§

impl<T, U, const N: usize> Mul<[U; N]> for Array<T, N>
where T: Mul<U>,

Source§

type Output = [<T as Mul<U>>::Output; N]

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: [U; N]) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U, const N: usize> Mul<Array<U, N>> for Array<T, N>
where T: Mul<U>,

Source§

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

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<T, U, const N: usize> MulAssign<[U; N]> for Array<T, N>
where T: MulAssign<U>,

Source§

fn mul_assign(&mut self, rhs: [U; N])

Performs the *= operation. Read more
Source§

impl<T, U, const N: usize> MulAssign<Array<U, N>> for Array<T, N>
where T: MulAssign<U>,

Source§

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

Performs the *= operation. Read more
Source§

impl<T, U, const N: usize> Sub<[U; N]> for Array<T, N>
where T: Sub<U>,

Source§

type Output = [<T as Sub<U>>::Output; N]

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: [U; N]) -> Self::Output

Performs the - operation. Read more
Source§

impl<T, U, const N: usize> Sub<Array<U, N>> for Array<T, N>
where T: Sub<U>,

Source§

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

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<T, U, const N: usize> SubAssign<[U; N]> for Array<T, N>
where T: SubAssign<U>,

Source§

fn sub_assign(&mut self, rhs: [U; N])

Performs the -= operation. Read more
Source§

impl<T, U, const N: usize> SubAssign<Array<U, N>> for Array<T, N>
where T: SubAssign<U>,

Source§

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

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for Array<T, N>
where T: Freeze,

§

impl<T, const N: usize> RefUnwindSafe for Array<T, N>
where T: RefUnwindSafe,

§

impl<T, const N: usize> Send for Array<T, N>
where T: Send,

§

impl<T, const N: usize> Sync for Array<T, N>
where T: Sync,

§

impl<T, const N: usize> Unpin for Array<T, N>
where T: Unpin,

§

impl<T, const N: usize> UnwindSafe for Array<T, N>
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> 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<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.