Struct JaggedArrayMutView

Source
pub struct JaggedArrayMutView<'a, TVal, TNum, const N: usize>
where TNum: AsPrimitive<usize> + Num, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,
{ /* private fields */ }

Implementations§

Source§

impl<'a, TVal, TNum> JaggedArrayMutView<'a, TVal, TNum, 1>

Source

pub fn as_slice<'b: 'a>(&'b self) -> &'a [TVal]

Source

pub fn as_slice_mut<'b: 'a>(&'b mut self) -> &'a mut [TVal]

Trait Implementations§

Source§

impl<'a, TVal: Debug, TNum, const N: usize> Debug for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num + Debug, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, TVal: Hash, TNum, const N: usize> Hash for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num + Hash, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, TVal, TNum, const N: usize> Index<[usize; N]> for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

type Output = TVal

The returned type after indexing.
Source§

fn index(&self, index: [usize; N]) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<'a, TVal, TNum, const N: usize> IndexMut<[usize; N]> for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: Num + AsPrimitive<usize>, U<N>: Sub<B1> + ArrayLength, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn index_mut(&mut self, index: [usize; N]) -> &mut TVal

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<'a, TVal, TNum, const N: usize> JaggedArrayMutViewTrait<TVal, TNum, N> for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: Num + AsPrimitive<usize> + ConstOne + ConstZero, U<N>: Sub<B1> + ArrayLength, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn view_mut<const M: usize, const R: usize>( &mut self, index: [usize; M], ) -> JaggedArrayMutView<'_, TVal, TNum, R>
where U<N>: Sub<U2> + Sub<B1> + Sub<U<M>>, <U<N> as Sub<U2>>::Output: ArrayLength, <U<N> as Sub<B1>>::Output: Sub<B1>, <<U<N> as Sub<B1>>::Output as Sub<B1>>::Output: ArrayLength, <U<N> as Sub<U<M>>>::Output: IsEqual<U<R>>, U<R>: Sub<B1>, <U<R> as Sub<B1>>::Output: ArrayLength, <<U<N> as Sub<U<M>>>::Output as IsEqual<U<R>>>::Output: NonZero, Const<N>: ToUInt, Const<M>: ToUInt, Const<R>: ToUInt,

Rust const generics does not support arithmetic, so we have to specify the view’s dimension(R) as well

Source§

impl<'a, TVal, TNum, const N: usize> JaggedArrayViewTrait<TVal, TNum, N> for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: Num + AsPrimitive<usize> + ConstOne + ConstZero, U<N>: Sub<B1> + ArrayLength, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn view<const M: usize, const R: usize>( &self, index: [usize; M], ) -> JaggedArrayView<'_, TVal, TNum, R>
where U<N>: Sub<U2> + Sub<B1> + Sub<U<M>>, <U<N> as Sub<U2>>::Output: ArrayLength, <U<N> as Sub<B1>>::Output: Sub<B1>, <<U<N> as Sub<B1>>::Output as Sub<B1>>::Output: ArrayLength, <U<N> as Sub<U<M>>>::Output: IsEqual<U<R>>, U<R>: Sub<B1>, <U<R> as Sub<B1>>::Output: ArrayLength, <<U<N> as Sub<U<M>>>::Output as IsEqual<U<R>>>::Output: NonZero, Const<N>: ToUInt, Const<M>: ToUInt, Const<R>: ToUInt,

Rust const generics does not support arithmetic, so we have to specify the view’s dimension(R) as well

Source§

unsafe fn view_unchecked<const M: usize, const R: usize>( &self, index: [usize; M], ) -> JaggedArrayView<'_, TVal, TNum, R>
where U<N>: Sub<U2> + Sub<B1> + Sub<U<M>>, <U<N> as Sub<U2>>::Output: ArrayLength, <U<N> as Sub<B1>>::Output: Sub<B1>, <<U<N> as Sub<B1>>::Output as Sub<B1>>::Output: ArrayLength, <U<N> as Sub<U<M>>>::Output: IsEqual<U<R>>, U<R>: Sub<B1>, <U<R> as Sub<B1>>::Output: ArrayLength, <<U<N> as Sub<U<M>>>::Output as IsEqual<U<R>>>::Output: NonZero, Const<N>: ToUInt, Const<M>: ToUInt, Const<R>: ToUInt,

Rust const generics does not support arithmetic, so we have to specify the view’s dimension(R) as well

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

unsafe fn get_unchecked(&self, index: [usize; N]) -> &TVal

Safety Read more
Source§

fn get(&self, index: [usize; N]) -> Option<&TVal>

Source§

fn to_owned(self) -> JaggedArrayOwnedView<TVal, TNum, N>
where TVal: Clone,

Source§

impl<'a, TVal: PartialEq, TNum, const N: usize> PartialEq for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num + PartialEq, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

fn eq(&self, other: &JaggedArrayMutView<'a, TVal, TNum, N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, TVal: Eq, TNum, const N: usize> Eq for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num + Eq, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Source§

impl<'a, TVal, TNum, const N: usize> StructuralPartialEq for JaggedArrayMutView<'a, TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

Auto Trait Implementations§

§

impl<'a, TVal, TNum, const N: usize> !Freeze for JaggedArrayMutView<'a, TVal, TNum, N>

§

impl<'a, TVal, TNum, const N: usize> !RefUnwindSafe for JaggedArrayMutView<'a, TVal, TNum, N>

§

impl<'a, TVal, TNum, const N: usize> Send for JaggedArrayMutView<'a, TVal, TNum, N>
where <<Const<N> as ToUInt>::Output as Sub<B1>>::Output: Sized, TVal: Send, TNum: Send,

§

impl<'a, TVal, TNum, const N: usize> Sync for JaggedArrayMutView<'a, TVal, TNum, N>
where <<Const<N> as ToUInt>::Output as Sub<B1>>::Output: Sized, TVal: Sync, TNum: Sync,

§

impl<'a, TVal, TNum, const N: usize> !Unpin for JaggedArrayMutView<'a, TVal, TNum, N>

§

impl<'a, TVal, TNum, const N: usize> !UnwindSafe for JaggedArrayMutView<'a, TVal, TNum, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.