[−][src]Struct block_grid::BlockGrid
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]
Trait Implementations
impl<T: Clone, B: Clone + BlockDim> Clone for BlockGrid<T, B>
[src]
fn clone(&self) -> BlockGrid<T, B>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T, B: BlockDim> Index<(usize, usize)> for BlockGrid<T, B>
[src]
type Output = T
The returned type after indexing.
fn index(&self, coords: Coords) -> &Self::Output
[src]
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]
fn eq(&self, other: &BlockGrid<T, B>) -> bool
[src]
fn ne(&self, other: &BlockGrid<T, B>) -> bool
[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,
B: Send,
T: Send,
impl<T, B> Sync for BlockGrid<T, B> where
B: Sync,
T: Sync,
B: Sync,
T: Sync,
impl<T, B> Unpin for BlockGrid<T, B> where
B: Unpin,
T: Unpin,
B: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,