Struct ndarray::SliceInfo [] [src]

#[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]

[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]

[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]

[src]

Formats the value using the given formatter.

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

The resulting type after dereferencing.

[src]

Dereferences the value.

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

[src]

Performs the conversion.

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

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more