Trait brassfibre::prelude::Slicer [] [src]

pub trait Slicer {
    type Scalar;
    fn len(&self) -> usize;
    fn iloc(&self, location: &usize) -> Self::Scalar;
    unsafe fn iloc_unchecked(&self, location: &usize) -> Self::Scalar;
    fn ilocs(&self, locations: &[usize]) -> Self;
    unsafe fn ilocs_unchecked(&self, locations: &[usize]) -> Self;
    fn ilocs_forced(&self, locations: &[usize]) -> Self;
    fn blocs(&self, flags: &[bool]) -> Self;

    fn reindex(&self, locations: &[usize]) -> Self { ... }
    unsafe fn reindex_unchecked(&self, locations: &[usize]) -> Self { ... }
    fn reindex_forced(&self, locations: &[usize]) -> Self { ... }
}

Indexing methods for 1-dimensional array-likes.

Associated Types

Required Methods

Return the length of myself

Return a single element specified with the location

Panics

  • if specified locations outs of bounds

Return a single element specified with the location

Return multiple elements specified with the locations

Panics

  • if specified locations outs of bounds

Return multiple elements specified with the locations

Return multiple elements specified with the locations

If specified locations outs of bounds, corresponding element is filled with null

Return multilpe elements specified with bool flags

Provided Methods

Return multiple elements specified with the locations

Panics

  • if specified locations outs of bounds

Return multiple elements specified with the locations

Return multiple elements specified with the locations

If specified locations outs of bounds, corresponding element is filled with null

Implementors