[][src]Struct block_grid::BlockGrid

pub struct BlockGrid<T, B: BlockDim> { /* fields omitted */ }

Implementations

impl<T, B: BlockDim> BlockGrid<T, B>[src]

pub fn from_raw_vec(rows: usize, cols: usize, elems: Vec<T>) -> Result<Self, ()>[src]

pub fn take_raw_vec(self) -> Vec<T>[src]

pub fn rows(&self) -> usize[src]

pub fn cols(&self) -> usize[src]

pub fn size(&self) -> usize[src]

pub fn row_blocks(&self) -> usize[src]

pub fn col_blocks(&self) -> usize[src]

pub fn blocks(&self) -> usize[src]

pub fn contains(&self, (row, cols): Coords) -> bool[src]

pub fn get(&self, coords: Coords) -> Option<&T>[src]

pub fn get_mut(&mut self, coords: Coords) -> Option<&mut T>[src]

pub unsafe fn get_unchecked(&self, coords: Coords) -> &T[src]

pub unsafe fn get_unchecked_mut(&mut self, coords: Coords) -> &mut T[src]

pub fn raw(&self) -> &[T][src]

pub fn raw_mut(&mut self) -> &mut [T][src]

pub fn each_iter(&self) -> EachIter<'_, T, B>[src]

pub fn each_iter_mut(&mut self) -> EachIterMut<'_, T, B>[src]

pub fn block_iter(&self) -> BlockIter<'_, T, B>[src]

pub fn block_iter_mut(&mut self) -> BlockIterMut<'_, T, B>[src]

pub fn row_major_iter(&self) -> RowMajorIter<'_, T, B>[src]

pub fn row_major_iter_mut(&mut self) -> RowMajorIterMut<'_, T, B>[src]

impl<T: Clone, B: BlockDim> BlockGrid<T, B>[src]

pub fn filled(rows: usize, cols: usize, elem: T) -> Result<Self, ()>[src]

pub fn from_row_major(rows: usize, cols: usize, elems: &[T]) -> Result<Self, ()>[src]

pub fn from_col_major(rows: usize, cols: usize, elems: &[T]) -> Result<Self, ()>[src]

impl<T: Clone + Default, B: BlockDim> BlockGrid<T, B>[src]

pub fn new(rows: usize, cols: usize) -> Result<Self, ()>[src]

Trait Implementations

impl<T: Clone, B: Clone + BlockDim> Clone for BlockGrid<T, B>[src]

impl<T: Debug, B: Debug + BlockDim> Debug for BlockGrid<T, B>[src]

impl<T: Eq, B: Eq + BlockDim> Eq for BlockGrid<T, B>[src]

impl<T: Hash, B: Hash + BlockDim> Hash for BlockGrid<T, B>[src]

impl<T, B: BlockDim> Index<(usize, usize)> for BlockGrid<T, B>[src]

type Output = T

The returned type after indexing.

impl<T, B: BlockDim> IndexMut<(usize, usize)> for BlockGrid<T, B>[src]

impl<T: PartialEq, B: PartialEq + BlockDim> PartialEq<BlockGrid<T, B>> for BlockGrid<T, B>[src]

impl<T, B: BlockDim> StructuralEq for BlockGrid<T, B>[src]

impl<T, B: BlockDim> StructuralPartialEq for BlockGrid<T, B>[src]

Auto Trait Implementations

impl<T, B> Send for BlockGrid<T, B> where
    B: Send,
    T: Send

impl<T, B> Sync for BlockGrid<T, B> where
    B: Sync,
    T: Sync

impl<T, B> Unpin for BlockGrid<T, B> where
    B: Unpin,
    T: Unpin

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.