[−][src]Struct ndsparse::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,
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]
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,
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 as Array>::Item: Clone,
[src]
A: Array + Clone,
<A as Array>::Item: Clone,
fn clone(&self) -> ArrayWrapper<A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A> Copy for ArrayWrapper<A> where
A: Array + Copy,
<A as Array>::Item: Copy,
[src]
A: Array + Copy,
<A as Array>::Item: Copy,
impl<A> Debug for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: Debug,
[src]
A: Array,
<A as Array>::Item: Debug,
impl<A> Default for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: Default,
[src]
A: Array,
<A as Array>::Item: Default,
fn default() -> ArrayWrapper<A>
[src]
impl<A> Deref for ArrayWrapper<A> where
A: Array,
[src]
A: Array,
type Target = A
The resulting type after dereferencing.
fn deref(&self) -> &<ArrayWrapper<A> as Deref>::Target
[src]
impl<A> DerefMut for ArrayWrapper<A> where
A: Array,
[src]
A: Array,
fn deref_mut(&mut self) -> &mut <ArrayWrapper<A> as Deref>::Target
[src]
impl<'de, A, T> Deserialize<'de> for ArrayWrapper<A> where
A: Array<Item = T>,
T: Deserialize<'de>,
[src]
A: Array<Item = T>,
T: Deserialize<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ArrayWrapper<A>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<ArrayWrapper<A>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl<A> Eq for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: Eq,
[src]
A: Array,
<A as Array>::Item: Eq,
impl<A> From<A> for ArrayWrapper<A> where
A: Array,
[src]
A: Array,
fn from(from: A) -> ArrayWrapper<A>
[src]
impl<I, A> Index<I> for ArrayWrapper<A> where
A: Array,
I: SliceIndex<[<A as Array>::Item]>,
[src]
A: Array,
I: SliceIndex<[<A as Array>::Item]>,
type Output = <I as SliceIndex<[<A as Array>::Item]>>::Output
The returned type after indexing.
fn index(&self, idx: I) -> &<ArrayWrapper<A> as Index<I>>::Output
[src]
impl<I, A> IndexMut<I> for ArrayWrapper<A> where
A: Array,
I: SliceIndex<[<A as Array>::Item]>,
[src]
A: Array,
I: SliceIndex<[<A as Array>::Item]>,
fn index_mut(&mut self, idx: I) -> &mut <ArrayWrapper<A> as Index<I>>::Output
[src]
impl<'a, A> IntoIterator for &'a ArrayWrapper<A> where
A: Array,
[src]
A: Array,
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?
fn into_iter(self) -> <&'a ArrayWrapper<A> as IntoIterator>::IntoIter
[src]
impl<'a, A> IntoIterator for &'a mut ArrayWrapper<A> where
A: Array,
[src]
A: Array,
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?
fn into_iter(self) -> <&'a mut ArrayWrapper<A> as IntoIterator>::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 as Array>::Item: Ord,
[src]
A: Array,
<A as Array>::Item: Ord,
fn cmp(&self, other: &ArrayWrapper<A>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.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 as Array>::Item: PartialEq<<A as Array>::Item>,
[src]
A: Array,
<A as Array>::Item: PartialEq<<A as Array>::Item>,
fn eq(&self, other: &ArrayWrapper<A>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<A> PartialOrd<ArrayWrapper<A>> for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: PartialOrd<<A as Array>::Item>,
[src]
A: Array,
<A as Array>::Item: PartialOrd<<A as Array>::Item>,
fn partial_cmp(&self, other: &ArrayWrapper<A>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<A> Serialize for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: Serialize,
[src]
A: Array,
<A as Array>::Item: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
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));
type Input = [usize; 2]
Input
type Output = ()
Output
fn swap(&mut self, <ArrayWrapper<A> as Swap>::Input)
[src]
impl<A> WithCapacity for ArrayWrapper<A> where
A: Array,
<A as Array>::Item: Default,
[src]
A: Array,
<A as Array>::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);
type Input = usize
Input
fn with_capacity(<ArrayWrapper<A> as WithCapacity>::Input) -> ArrayWrapper<A>
[src]
Auto Trait Implementations
impl<A> RefUnwindSafe for ArrayWrapper<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
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,
impl<A> UnwindSafe for ArrayWrapper<A> where
A: UnwindSafe,
A: UnwindSafe,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,