[][src]Struct ndarray::SliceInfo

#[repr(C)]
pub struct SliceInfo<T: ?Sized, D: Dimension> { /* fields omitted */ }

Represents all of the necessary information to perform a slice.

The type T is typically [SliceOrIndex; n], [SliceOrIndex], or Vec<SliceOrIndex>. The type D is the output dimension after calling .slice().

Methods

impl<T, D> SliceInfo<T, D> where
    T: AsRef<[SliceOrIndex]>,
    D: Dimension
[src]

Returns a new SliceInfo instance.

Errors if D is not consistent with indices.

impl<T: ?Sized, D> SliceInfo<T, D> where
    T: AsRef<[SliceOrIndex]>,
    D: Dimension
[src]

Returns the number of dimensions after calling .slice() (including taking subviews).

If D is a fixed-size dimension type, then this is equivalent to D::NDIM.unwrap(). Otherwise, the value is calculated by iterating over the ranges/indices.

Trait Implementations

impl<T: Debug + ?Sized, D: Debug + Dimension> Debug for SliceInfo<T, D>
[src]

Formats the value using the given formatter. Read more

impl<T: ?Sized, D> Deref for SliceInfo<T, D> where
    D: Dimension
[src]

The resulting type after dereferencing.

Dereferences the value.

impl<T, D> AsRef<[SliceOrIndex]> for SliceInfo<T, D> where
    T: AsRef<[SliceOrIndex]>,
    D: Dimension
[src]

Performs the conversion.

impl<T, D> AsRef<SliceInfo<[SliceOrIndex], D>> for SliceInfo<T, D> where
    T: AsRef<[SliceOrIndex]>,
    D: Dimension
[src]

Performs the conversion.

impl<T, D> Copy for SliceInfo<T, D> where
    T: Copy,
    D: Dimension
[src]

impl<T, D> Clone for SliceInfo<T, D> where
    T: Clone,
    D: Dimension
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T: ?Sized, D> Send for SliceInfo<T, D> where
    T: Send

impl<T: ?Sized, D> Sync for SliceInfo<T, D> where
    T: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more