[−][src]Struct toodee::TooDeeViewMut
Provides a mutable view (or subset), of a TooDee
array.
Implementations
impl<'a, T> TooDeeViewMut<'a, T>
[src]
pub fn new(
num_cols: usize,
num_rows: usize,
data: &'a mut [T]
) -> TooDeeViewMut<'a, T>
[src]
num_cols: usize,
num_rows: usize,
data: &'a mut [T]
) -> TooDeeViewMut<'a, T>
Create a new TooDeeViewMut
using the provided mutable slice reference.
Will panic if one of the dimensions is zero but the other is non-zero. This is to enforce the rule that empty arrays have no dimensions.
Will panic if the slice's length is not sufficient to represent the desired array dimensions.
Trait Implementations
impl<'_, T> CopyOps<T> for TooDeeViewMut<'_, T>
[src]
fn copy_from_slice(&mut self, src: &[T]) where
T: Copy,
[src]
T: Copy,
fn clone_from_slice(&mut self, src: &[T]) where
T: Clone,
[src]
T: Clone,
fn copy_from_toodee(&mut self, src: &impl TooDeeOps<T>) where
T: Copy,
[src]
T: Copy,
fn clone_from_toodee(&mut self, src: &impl TooDeeOps<T>) where
T: Clone,
[src]
T: Clone,
fn copy_within(&mut self, src: (Coordinate, Coordinate), dest: Coordinate) where
T: Copy,
[src]
T: Copy,
impl<'_, T> Debug for TooDeeViewMut<'_, T> where
T: Debug,
[src]
T: Debug,
impl<'_, T> From<TooDeeViewMut<'_, T>> for TooDee<T> where
T: Clone,
[src]
T: Clone,
fn from(view: TooDeeViewMut<T>) -> Self
[src]
impl<'a, T> Index<usize> for TooDeeViewMut<'a, T>
[src]
type Output = [T]
The returned type after indexing.
fn index(&self, row: usize) -> &Self::Output
[src]
impl<'a, T> IndexMut<usize> for TooDeeViewMut<'a, T>
[src]
impl<'a, T> Into<TooDeeView<'a, T>> for TooDeeViewMut<'a, T>
[src]
fn into(self) -> TooDeeView<'a, T>
[src]
impl<'a, T> IntoIterator for &'a TooDeeViewMut<'a, T>
[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Cells<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T> IntoIterator for &'a mut TooDeeViewMut<'a, T>
[src]
type Item = &'a mut T
The type of the elements being iterated over.
type IntoIter = CellsMut<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'_, T> SortOps<T> for TooDeeViewMut<'_, T>
[src]
fn sort_row_ord<F>(&mut self, row: usize) where
T: Ord,
[src]
T: Ord,
fn sort_unstable_row_ord<F>(&mut self, row: usize) where
T: Ord,
[src]
T: Ord,
fn sort_by_row<F>(&mut self, row: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn sort_unstable_by_row<F>(&mut self, row: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn sort_by_row_key<B, F>(&mut self, row: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn sort_unstable_by_row_key<B, F>(&mut self, row: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn sort_col_ord<F>(&mut self, col: usize) where
T: Ord,
[src]
T: Ord,
fn sort_by_col<F>(&mut self, col: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn sort_unstable_by_col<F>(&mut self, col: usize, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
fn sort_by_col_key<B, F>(&mut self, col: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
fn sort_unstable_by_col_key<B, F>(&mut self, col: usize, f: F) where
B: Ord,
F: FnMut(&T) -> B,
[src]
B: Ord,
F: FnMut(&T) -> B,
impl<'a, T> TooDeeOps<T> for TooDeeViewMut<'a, T>
[src]
fn num_rows(&self) -> usize
[src]
fn num_cols(&self) -> usize
[src]
fn bounds(&self) -> (Coordinate, Coordinate)
[src]
fn view(&self, start: Coordinate, end: Coordinate) -> TooDeeView<T>
[src]
fn rows(&self) -> Rows<T>
[src]
fn col(&self, col: usize) -> Col<T>
[src]
fn size(&self) -> (usize, usize)
[src]
fn is_empty(&self) -> bool
[src]
fn cells(&self) -> Cells<T>
[src]
impl<'a, T> TooDeeOpsMut<T> for TooDeeViewMut<'a, T>
[src]
fn view_mut(&mut self, start: Coordinate, end: Coordinate) -> TooDeeViewMut<T>
[src]
fn rows_mut(&mut self) -> RowsMut<T>
[src]
fn col_mut(&mut self, col: usize) -> ColMut<T>
[src]
fn cells_mut(&mut self) -> CellsMut<T>
[src]
fn fill<V>(&mut self, fill: V) where
V: Borrow<T>,
T: Clone,
[src]
V: Borrow<T>,
T: Clone,
fn swap_cols(&mut self, c1: usize, c2: usize)
[src]
fn swap_rows(&mut self, r1: usize, r2: usize)
[src]
fn row_pair_mut(&mut self, r1: usize, r2: usize) -> (&mut [T], &mut [T])
[src]
impl<'_, T> TranslateOps<T> for TooDeeViewMut<'_, T>
[src]
fn translate_with_wrap(&mut self, mid: Coordinate)
[src]
fn flip_rows(&mut self)
[src]
fn flip_cols(&mut self)
[src]
Auto Trait Implementations
impl<'a, T> Send for TooDeeViewMut<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for TooDeeViewMut<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for TooDeeViewMut<'a, T>
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,
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, 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.
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>,