[][src]Struct ndsparse::ArrayWrapper

pub struct ArrayWrapper<A> { /* fields omitted */ }

With const-generics feature, wraps an arbitrary length array. Otherwise, wraps an array with a selected number of elements. Necessary for third-party and std implementations.

This structure will be removed once const-generics is stabilized.

Implementations

impl<A> ArrayWrapper<A> where
    A: Array
[src]

pub fn new(array: A) -> ArrayWrapper<A>[src]

Wraps array into this structure.

Trait Implementations

impl<A> AsMut<[<A as Array>::Item]> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> AsMut<A> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> AsRef<[<A as Array>::Item]> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> AsRef<A> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> Borrow<[<A as Array>::Item]> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> Borrow<A> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> BorrowMut<[<A as Array>::Item]> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> BorrowMut<A> for ArrayWrapper<A> where
    A: Array
[src]

impl<A> Capacity for ArrayWrapper<A> where
    A: Array
[src]

let mut structure = cl_traits::doc_tests::array_wrapper();
assert_eq!(cl_traits::Capacity::capacity(&structure), 3);

type Output = usize

Output

impl<A> Clone for ArrayWrapper<A> where
    A: Array + Clone,
    <A as Array>::Item: Clone
[src]

impl<A> Copy for ArrayWrapper<A> where
    A: Array + Copy,
    <A as Array>::Item: Copy
[src]

impl<A> Debug for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Debug
[src]

impl<A> Default for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Default
[src]

impl<A> Deref for ArrayWrapper<A> where
    A: Array
[src]

type Target = A

The resulting type after dereferencing.

impl<A> DerefMut for ArrayWrapper<A> where
    A: Array
[src]

impl<'de, A, T> Deserialize<'de> for ArrayWrapper<A> where
    A: Array<Item = T>,
    T: Deserialize<'de>, 
[src]

impl<A> Eq for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Eq
[src]

impl<A> From<A> for ArrayWrapper<A> where
    A: Array
[src]

impl<I, A> Index<I> for ArrayWrapper<A> where
    A: Array,
    I: SliceIndex<[<A as Array>::Item]>, 
[src]

type Output = <I as SliceIndex<[<A as Array>::Item]>>::Output

The returned type after indexing.

impl<I, A> IndexMut<I> for ArrayWrapper<A> where
    A: Array,
    I: SliceIndex<[<A as Array>::Item]>, 
[src]

impl<'a, A> IntoIterator for &'a ArrayWrapper<A> where
    A: Array
[src]

type Item = &'a <A as Array>::Item

The type of the elements being iterated over.

type IntoIter = Iter<'a, <A as Array>::Item>

Which kind of iterator are we turning this into?

impl<'a, A> IntoIterator for &'a mut ArrayWrapper<A> where
    A: Array
[src]

type Item = &'a mut <A as Array>::Item

The type of the elements being iterated over.

type IntoIter = IterMut<'a, <A as Array>::Item>

Which kind of iterator are we turning this into?

impl<A> Length for ArrayWrapper<A> where
    A: Array
[src]

let structure = cl_traits::doc_tests::array_wrapper();
assert_eq!(cl_traits::Length::length(&structure), 3);

type Output = usize

Output

impl<A> Ord for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Ord
[src]

impl<A> PartialEq<ArrayWrapper<A>> for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: PartialEq<<A as Array>::Item>, 
[src]

impl<A> PartialOrd<ArrayWrapper<A>> for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: PartialOrd<<A as Array>::Item>, 
[src]

impl<A> Serialize for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Serialize
[src]

impl<A> Storage for ArrayWrapper<A> where
    A: Array
[src]

type Item = <A as Array>::Item

Storage item

impl<A> Swap for ArrayWrapper<A> where
    A: Array
[src]

let mut structure = cl_traits::doc_tests::array_wrapper();
cl_traits::Swap::swap(&mut structure, [0, 2]);
assert_eq!(structure.get(0), Some(&3));
assert_eq!(structure.get(2), Some(&1));

type Input = [usize; 2]

Input

type Output = ()

Output

impl<A> WithCapacity for ArrayWrapper<A> where
    A: Array,
    <A as Array>::Item: Default
[src]

use cl_traits::Capacity;
let structure: cl_traits::ArrayWrapper<[i32; 5]>;
structure = cl_traits::WithCapacity::with_capacity(Default::default());
assert_eq!(structure.capacity(), 5);

type Input = usize

Input

Auto Trait Implementations

impl<A> RefUnwindSafe for ArrayWrapper<A> where
    A: RefUnwindSafe

impl<A> Send for ArrayWrapper<A> where
    A: Send

impl<A> Sync for ArrayWrapper<A> where
    A: Sync

impl<A> Unpin for ArrayWrapper<A> where
    A: Unpin

impl<A> UnwindSafe for ArrayWrapper<A> where
    A: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,