Struct jaggedarray::jagged_array::JaggedArrayOwnedView

source ·
pub struct JaggedArrayOwnedView<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 */ }

Trait Implementations§

source§

impl<TVal: Clone, TNum, const N: usize> Clone for JaggedArrayOwnedView<TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num + Clone, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

source§

fn clone(&self) -> JaggedArrayOwnedView<TVal, TNum, N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<TVal: Debug, TNum, const N: usize> Debug for JaggedArrayOwnedView<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<TVal: Hash, TNum, const N: usize> Hash for JaggedArrayOwnedView<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<TVal, TNum, const N: usize> Index<[usize; N]> for JaggedArrayOwnedView<TVal, TNum, N>
where TNum: AsPrimitive<usize> + Num, U<N>: Sub<B1>, <U<N> as Sub<B1>>::Output: ArrayLength, Const<N>: ToUInt,

§

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<TVal, TNum, const N: usize> IndexMut<[usize; N]> for JaggedArrayOwnedView<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<TVal, TNum> JaggedArray1DMutViewTrait<TVal, TNum> for JaggedArrayOwnedView<TVal, TNum, 1>
where TNum: AsPrimitive<usize> + Num,

source§

fn as_slice_mut(&mut self) -> &mut [TVal]

source§

impl<TVal, TNum> JaggedArray1DViewTrait<TVal, TNum> for JaggedArrayOwnedView<TVal, TNum, 1>
where TNum: AsPrimitive<usize> + Num,

source§

fn as_slice(&self) -> &[TVal]

source§

impl<TVal, TNum, const N: usize> JaggedArrayMutViewTrait<TVal, TNum, N> for JaggedArrayOwnedView<TVal, TNum, N>
where TNum: Num + AsPrimitive<usize> + ConstOne + ConstZero, U<N>: Sub<B1>, U<N>: 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>, <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>: Sub<U<M>>, <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<TVal, TNum, const N: usize> JaggedArrayViewTrait<TVal, TNum, N> for JaggedArrayOwnedView<TVal, TNum, N>
where TNum: Num + AsPrimitive<usize> + ConstOne + ConstZero, U<N>: Sub<B1>, U<N>: 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>, <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>: Sub<U<M>>, <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>, <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>: Sub<U<M>>, <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<TVal: PartialEq, TNum, const N: usize> PartialEq for JaggedArrayOwnedView<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: &JaggedArrayOwnedView<TVal, TNum, N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<TVal: Eq, TNum, const N: usize> Eq for JaggedArrayOwnedView<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<TVal, TNum, const N: usize> StructuralPartialEq for JaggedArrayOwnedView<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<TVal, TNum, const N: usize> !Freeze for JaggedArrayOwnedView<TVal, TNum, N>

§

impl<TVal, TNum, const N: usize> !RefUnwindSafe for JaggedArrayOwnedView<TVal, TNum, N>

§

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

§

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

§

impl<TVal, TNum, const N: usize> !Unpin for JaggedArrayOwnedView<TVal, TNum, N>

§

impl<TVal, TNum, const N: usize> !UnwindSafe for JaggedArrayOwnedView<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

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.