Skip to main content

Index

Enum Index 

Source
pub enum Index<B: Backend> {
    Int(i64),
    Slice(Slice),
    Dynamic(Scalar<B, i32>),
    NewAxis,
    Ellipsis,
}
Expand description

One component of an index.

Variants§

§

Int(i64)

A static integer (negative counts from the end).

§

Slice(Slice)

A static slice.

§

Dynamic(Scalar<B, i32>)

A run-time index (negative counts from the end).

§

NewAxis

A new dimension of size 1.

§

Ellipsis

Whole dimensions.

Trait Implementations§

Source§

impl<B: Clone + Backend> Clone for Index<B>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<B: Copy + Backend> Copy for Index<B>

Source§

impl<B: Debug + Backend> Debug for Index<B>

Source§

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

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

impl<B: Backend> From<Ellipsis> for Index<B>

Source§

fn from(_: Ellipsis) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<NewAxis> for Index<B>

Source§

fn from(_: NewAxis) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<Range<i32>> for Index<B>

Source§

fn from(r: Range<i32>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<Range<i64>> for Index<B>

Source§

fn from(r: Range<i64>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<Range<usize>> for Index<B>

Source§

fn from(r: Range<usize>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeFrom<i32>> for Index<B>

Source§

fn from(r: RangeFrom<i32>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeFrom<i64>> for Index<B>

Source§

fn from(r: RangeFrom<i64>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeFrom<usize>> for Index<B>

Source§

fn from(r: RangeFrom<usize>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeFull> for Index<B>

Source§

fn from(_: RangeFull) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeInclusive<i32>> for Index<B>

Source§

fn from(r: RangeInclusive<i32>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeInclusive<i64>> for Index<B>

Source§

fn from(r: RangeInclusive<i64>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeInclusive<usize>> for Index<B>

Source§

fn from(r: RangeInclusive<usize>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeTo<i32>> for Index<B>

Source§

fn from(r: RangeTo<i32>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeTo<i64>> for Index<B>

Source§

fn from(r: RangeTo<i64>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeTo<usize>> for Index<B>

Source§

fn from(r: RangeTo<usize>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeToInclusive<i32>> for Index<B>

Source§

fn from(r: RangeToInclusive<i32>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeToInclusive<i64>> for Index<B>

Source§

fn from(r: RangeToInclusive<i64>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<RangeToInclusive<usize>> for Index<B>

Source§

fn from(r: RangeToInclusive<usize>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend, I: Int> From<Scalar<B, I>> for Index<B>

Source§

fn from(s: Scalar<B, I>) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<Slice> for Index<B>

Source§

fn from(s: Slice) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<i32> for Index<B>

Source§

fn from(i: i32) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<i64> for Index<B>

Source§

fn from(i: i64) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<isize> for Index<B>

Source§

fn from(i: isize) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<u32> for Index<B>

Source§

fn from(i: u32) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> From<usize> for Index<B>

Source§

fn from(i: usize) -> Self

Converts to this type from the input type.
Source§

impl<B: Backend> FromIterator<Index<B>> for Indices<B>

Source§

fn from_iter<I: IntoIterator<Item = Index<B>>>(iter: I) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl<B> Freeze for Index<B>
where <B as Backend>::Scalar<i32>: Freeze,

§

impl<B> RefUnwindSafe for Index<B>
where <B as Backend>::Scalar<i32>: RefUnwindSafe,

§

impl<B> Send for Index<B>
where <B as Backend>::Scalar<i32>: Send,

§

impl<B> Sync for Index<B>
where <B as Backend>::Scalar<i32>: Sync,

§

impl<B> Unpin for Index<B>
where <B as Backend>::Scalar<i32>: Unpin,

§

impl<B> UnsafeUnpin for Index<B>
where <B as Backend>::Scalar<i32>: UnsafeUnpin,

§

impl<B> UnwindSafe for Index<B>
where <B as Backend>::Scalar<i32>: UnwindSafe,

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<B, T> IntoIndices<B> for T
where B: Backend, T: Into<Index<B>>,

Source§

fn into_indices(self) -> Indices<B>

The components.
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.