[−][src]Struct toodee::TooDeeView
Provides a read-only view (or subset) of a TooDee
array.
Implementations
impl<'a, T> TooDeeView<'a, T>
[src]
pub fn new(num_cols: usize, num_rows: usize, data: &'a [T]) -> TooDeeView<'a, T>
[src]
Create a new TooDeeViewMut
using the provided 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<'a, T: Clone> Clone for TooDeeView<'a, T>
[src]
fn clone(&self) -> TooDeeView<'a, T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, T: Copy> Copy for TooDeeView<'a, T>
[src]
impl<'_, T> Debug for TooDeeView<'_, T> where
T: Debug,
[src]
T: Debug,
impl<'_, T> From<TooDeeView<'_, T>> for TooDee<T> where
T: Clone,
[src]
T: Clone,
fn from(view: TooDeeView<T>) -> Self
[src]
impl<'a, T> Index<usize> for TooDeeView<'a, T>
[src]
type Output = [T]
The returned type after indexing.
fn index(&self, row: usize) -> &Self::Output
[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 TooDeeView<'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> TooDeeOps<T> for TooDeeView<'a, T>
[src]
fn num_cols(&self) -> usize
[src]
fn num_rows(&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]
Auto Trait Implementations
impl<'a, T> Send for TooDeeView<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Sync for TooDeeView<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for TooDeeView<'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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,