Struct generic_array::GenericArray [−][src]
#[repr(transparent)]pub struct GenericArray<T, U: ArrayLength<T>> { /* fields omitted */ }
Expand description
Struct representing a generic array - GenericArray<T, N>
works like [T; N]
Implementations
Extracts a mutable slice containing the entire array.
Converts slice to a generic array reference with inferred length;
Length of the slice must be equal to the length of the array.
Converts mutable slice to a mutable generic array reference
Length of the slice must be equal to the length of the array.
Construct a GenericArray
from a slice by cloning its content
Length of the slice must be equal to the length of the array
Creates a new GenericArray
instance from an iterator with a specific size.
Returns None
if the size is not equal to the number of elements in the GenericArray
.
Trait Implementations
Mutably borrows from an owned value. Read more
impl<T, N, M> Concat<T, M> for GenericArray<T, N> where
N: ArrayLength<T> + Add<M>,
M: ArrayLength<T>,
Sum<N, M>: ArrayLength<T>,
[src]
impl<T, N, M> Concat<T, M> for GenericArray<T, N> where
N: ArrayLength<T> + Add<M>,
M: ArrayLength<T>,
Sum<N, M>: ArrayLength<T>,
[src]type Rest = GenericArray<T, M>
type Rest = GenericArray<T, M>
Sequence to be concatenated with self
type Output = GenericArray<T, Sum<N, M>>
type Output = GenericArray<T, Sum<N, M>>
Resulting sequence formed by the concatenation.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Converts slice to a generic array reference with inferred length;
Length of the slice must be equal to the length of the array.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Converts mutable slice to a mutable generic array reference
Length of the slice must be equal to the length of the array.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Creates a value from an iterator. Read more
impl<T, N> FunctionalSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: GenericSequence<T, Item = T, Length = N>,
[src]
impl<T, N> FunctionalSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: GenericSequence<T, Item = T, Length = N>,
[src]fn map<U, F>(self, f: F) -> MappedSequence<Self, T, U> where
Self::Length: ArrayLength<U>,
Self: MappedGenericSequence<T, U>,
F: FnMut(T) -> U,
[src]
fn map<U, F>(self, f: F) -> MappedSequence<Self, T, U> where
Self::Length: ArrayLength<U>,
Self: MappedGenericSequence<T, U>,
F: FnMut(T) -> U,
[src]Maps a GenericSequence
to another GenericSequence
. Read more
fn zip<B, Rhs, U, F>(self, rhs: Rhs, f: F) -> MappedSequence<Self, T, U> where
Self: MappedGenericSequence<T, U>,
Rhs: MappedGenericSequence<B, U, Mapped = MappedSequence<Self, T, U>>,
Self::Length: ArrayLength<B> + ArrayLength<U>,
Rhs: GenericSequence<B, Length = Self::Length>,
F: FnMut(T, Rhs::Item) -> U,
[src]
fn zip<B, Rhs, U, F>(self, rhs: Rhs, f: F) -> MappedSequence<Self, T, U> where
Self: MappedGenericSequence<T, U>,
Rhs: MappedGenericSequence<B, U, Mapped = MappedSequence<Self, T, U>>,
Self::Length: ArrayLength<B> + ArrayLength<U>,
Rhs: GenericSequence<B, Length = Self::Length>,
F: FnMut(T, Rhs::Item) -> U,
[src]Combines two GenericSequence
instances and iterates through both of them,
initializing a new GenericSequence
with the result of the zipped mapping function. Read more
impl<T, N> GenericSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: IntoIterator<Item = T>,
[src]
impl<T, N> GenericSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: IntoIterator<Item = T>,
[src]impl<T, N: ArrayLength<T>> Lengthen<T> for GenericArray<T, N> where
N: Add<B1>,
Add1<N>: ArrayLength<T>,
Add1<N>: Sub<B1, Output = N>,
Sub1<Add1<N>>: ArrayLength<T>,
[src]
impl<T, N: ArrayLength<T>> Lengthen<T> for GenericArray<T, N> where
N: Add<B1>,
Add1<N>: ArrayLength<T>,
Add1<N>: Sub<B1, Output = N>,
Sub1<Add1<N>>: ArrayLength<T>,
[src]type Longer = GenericArray<T, Add1<N>>
type Longer = GenericArray<T, Add1<N>>
GenericSequence
that has one more element than Self
Returns a new array with the given element appended to the end of it. Read more
impl<T: ArrayLength<u8>> LowerHex for GenericArray<u8, T> where
T: Add<T>,
<T as Add<T>>::Output: ArrayLength<u8>,
[src]
impl<T: ArrayLength<u8>> LowerHex for GenericArray<u8, T> where
T: Add<T>,
<T as Add<T>>::Output: ArrayLength<u8>,
[src]impl<T, U, N> MappedGenericSequence<T, U> for GenericArray<T, N> where
N: ArrayLength<T> + ArrayLength<U>,
GenericArray<U, N>: GenericSequence<U, Length = N>,
[src]
impl<T, U, N> MappedGenericSequence<T, U> for GenericArray<T, N> where
N: ArrayLength<T> + ArrayLength<U>,
GenericArray<U, N>: GenericSequence<U, Length = N>,
[src]type Mapped = GenericArray<U, N>
type Mapped = GenericArray<U, N>
Mapped sequence type
impl<T: PartialEq, N> PartialEq<GenericArray<T, N>> for GenericArray<T, N> where
N: ArrayLength<T>,
[src]
impl<T: PartialEq, N> PartialEq<GenericArray<T, N>> for GenericArray<T, N> where
N: ArrayLength<T>,
[src]impl<T: PartialOrd, N> PartialOrd<GenericArray<T, N>> for GenericArray<T, N> where
N: ArrayLength<T>,
[src]
impl<T: PartialOrd, N> PartialOrd<GenericArray<T, N>> for GenericArray<T, N> where
N: ArrayLength<T>,
[src]This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T, N: ArrayLength<T>> Shorten<T> for GenericArray<T, N> where
N: Sub<B1>,
Sub1<N>: ArrayLength<T>,
Sub1<N>: Add<B1, Output = N>,
Add1<Sub1<N>>: ArrayLength<T>,
[src]
impl<T, N: ArrayLength<T>> Shorten<T> for GenericArray<T, N> where
N: Sub<B1>,
Sub1<N>: ArrayLength<T>,
Sub1<N>: Add<B1, Output = N>,
Add1<Sub1<N>>: ArrayLength<T>,
[src]type Shorter = GenericArray<T, Sub1<N>>
type Shorter = GenericArray<T, Sub1<N>>
GenericSequence
that has one less element than Self
Returns a new array without the last element, and the last element. Read more
impl<T, N, K> Split<T, K> for GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T>,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]
impl<T, N, K> Split<T, K> for GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T>,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]type First = GenericArray<T, K>
type First = GenericArray<T, K>
First part of the resulting split array
type Second = GenericArray<T, Diff<N, K>>
type Second = GenericArray<T, Diff<N, K>>
Second part of the resulting split array
impl<'a, T, N, K> Split<T, K> for &'a GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T> + 'static,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]
impl<'a, T, N, K> Split<T, K> for &'a GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T> + 'static,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]type First = &'a GenericArray<T, K>
type First = &'a GenericArray<T, K>
First part of the resulting split array
type Second = &'a GenericArray<T, Diff<N, K>>
type Second = &'a GenericArray<T, Diff<N, K>>
Second part of the resulting split array
impl<'a, T, N, K> Split<T, K> for &'a mut GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T> + 'static,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]
impl<'a, T, N, K> Split<T, K> for &'a mut GenericArray<T, N> where
N: ArrayLength<T>,
K: ArrayLength<T> + 'static,
N: Sub<K>,
Diff<N, K>: ArrayLength<T>,
[src]type First = &'a mut GenericArray<T, K>
type First = &'a mut GenericArray<T, K>
First part of the resulting split array
type Second = &'a mut GenericArray<T, Diff<N, K>>
type Second = &'a mut GenericArray<T, Diff<N, K>>
Second part of the resulting split array