[−][src]Struct cl_traits::ArrayWrapper
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]
A: Array,
Trait Implementations
impl<A> AsMut<[<A as Array>::Item]> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> AsMut<A> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> AsRef<[<A as Array>::Item]> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> AsRef<A> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> Borrow<[<A as Array>::Item]> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> Borrow<A> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> BorrowMut<[<A as Array>::Item]> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
fn borrow_mut(&mut self) -> &mut [A::Item][src]
impl<A> BorrowMut<A> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
fn borrow_mut(&mut self) -> &mut A[src]
impl<A> Capacity for ArrayWrapper<A> where
A: Array, [src]
A: Array,
let mut structure = cl_traits::doc_tests::array_wrapper(); assert_eq!(cl_traits::Capacity::capacity(&structure), 3);
impl<A> Clone for ArrayWrapper<A> where
A: Array + Clone,
A::Item: Clone, [src]
A: Array + Clone,
A::Item: Clone,
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<A> Copy for ArrayWrapper<A> where
A: Array + Copy,
A::Item: Copy, [src]
A: Array + Copy,
A::Item: Copy,
impl<A> Debug for ArrayWrapper<A> where
A: Array,
A::Item: Debug, [src]
A: Array,
A::Item: Debug,
impl<A> Default for ArrayWrapper<A> where
A: Array,
A::Item: Default, [src]
A: Array,
A::Item: Default,
impl<A> Deref for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> DerefMut for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> Eq for ArrayWrapper<A> where
A: Array,
A::Item: Eq, [src]
A: Array,
A::Item: Eq,
impl<A> From<A> for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<I, A> Index<I> for ArrayWrapper<A> where
A: Array,
I: SliceIndex<[A::Item]>, [src]
A: Array,
I: SliceIndex<[A::Item]>,
type Output = <I as SliceIndex<[A::Item]>>::Output
The returned type after indexing.
fn index(&self, idx: I) -> &Self::Output[src]
impl<I, A> IndexMut<I> for ArrayWrapper<A> where
A: Array,
I: SliceIndex<[A::Item]>, [src]
A: Array,
I: SliceIndex<[A::Item]>,
impl<'a, A> IntoIterator for &'a ArrayWrapper<A> where
A: Array, [src]
A: Array,
type Item = &'a A::Item
The type of the elements being iterated over.
type IntoIter = Iter<'a, A::Item>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, A> IntoIterator for &'a mut ArrayWrapper<A> where
A: Array, [src]
A: Array,
type Item = &'a mut A::Item
The type of the elements being iterated over.
type IntoIter = IterMut<'a, A::Item>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<A> Length for ArrayWrapper<A> where
A: Array, [src]
A: Array,
let structure = cl_traits::doc_tests::array_wrapper(); assert_eq!(cl_traits::Length::length(&structure), 3);
impl<A> Ord for ArrayWrapper<A> where
A: Array,
A::Item: Ord, [src]
A: Array,
A::Item: Ord,
fn cmp(&self, other: &Self) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<A> PartialEq<ArrayWrapper<A>> for ArrayWrapper<A> where
A: Array,
A::Item: PartialEq, [src]
A: Array,
A::Item: PartialEq,
impl<A> PartialOrd<ArrayWrapper<A>> for ArrayWrapper<A> where
A: Array,
A::Item: PartialOrd, [src]
A: Array,
A::Item: PartialOrd,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl<A> Storage for ArrayWrapper<A> where
A: Array, [src]
A: Array,
impl<A> Swap for ArrayWrapper<A> where
A: Array, [src]
A: Array,
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));
impl<A> WithCapacity for ArrayWrapper<A> where
A: Array,
A::Item: Default, [src]
A: Array,
A::Item: Default,
use cl_traits::Capacity; let structure: cl_traits::ArrayWrapper<[i32; 5]>; structure = cl_traits::WithCapacity::with_capacity(Default::default()); assert_eq!(structure.capacity(), 5);
Auto Trait Implementations
impl<A> Send for ArrayWrapper<A> where
A: Send,
A: Send,
impl<A> Sync for ArrayWrapper<A> where
A: Sync,
A: Sync,
impl<A> Unpin for ArrayWrapper<A> where
A: Unpin,
A: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,