Struct generic_array::GenericArray [] [src]

pub struct GenericArray<T, U: ArrayLength<T>> { /* fields omitted */ }

Struct representing a generic array - GenericArray<T, N> works like [T; N]

Methods

impl<T, N> GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

map a function over a slice to a GenericArray. The length of the slice must be equal to the length of the array

map a function over a GenericArray.

Extracts a slice containing the entire array

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

impl<T: Clone, N> GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Function constructing an array from a slice by clonning its content

Length of the slice must be equal to the length of the array

Trait Implementations

impl<T, N> IntoIterator for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<T: ArrayLength<u8>> LowerHex for GenericArray<u8, T> where
    T: Add<T>,
    <T as Add<T>>::Output: ArrayLength<u8>, 
[src]

Formats the value using the given formatter.

impl<T: ArrayLength<u8>> UpperHex for GenericArray<u8, T> where
    T: Add<T>,
    <T as Add<T>>::Output: ArrayLength<u8>, 
[src]

Formats the value using the given formatter.

impl<T: Default, N> Default for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Returns the "default value" for a type. Read more

impl<T: Clone, N> Clone for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy, N> Copy for GenericArray<T, N> where
    N: ArrayLength<T>,
    N::ArrayType: Copy
[src]

impl<T: PartialEq, N> PartialEq for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq, N> Eq for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

impl<T: PartialOrd, N> PartialOrd 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Ord, N> Ord for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

This method returns an Ordering between self and other. Read more

impl<T: Debug, N> Debug for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Formats the value using the given formatter.

impl<T, N> Borrow<[T]> for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Immutably borrows from an owned value. Read more

impl<T, N> BorrowMut<[T]> for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Mutably borrows from an owned value. Read more

impl<T, N> AsRef<[T]> for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Performs the conversion.

impl<T, N> AsMut<[T]> for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Performs the conversion.

impl<T: Hash, N> Hash for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T, N> Deref for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<T, N> DerefMut for GenericArray<T, N> where
    N: ArrayLength<T>, 
[src]

The method called to mutably dereference a value