[−][src]Struct flatdata::MultiArrayView
A read-only view on a multivector.
For the detailed description of multivector and examples, cf.
MultiVector.
Methods
impl<'a, Ts> MultiArrayView<'a, Ts> where
Ts: VariadicRefFactory, [src]
Ts: VariadicRefFactory,
pub fn new(
index: ArrayView<'a, <Ts as VariadicStruct<'a>>::Index>,
data_mem_descr: &'a [u8]
) -> Self[src]
index: ArrayView<'a, <Ts as VariadicStruct<'a>>::Index>,
data_mem_descr: &'a [u8]
) -> Self
Creates a new MultiArrayView to the data at the given address.
The returned array view does not own the data.
pub fn len(&self) -> usize[src]
Number of indexed items in the array.
Note that this is not the total number of overall elements stored in the array. An item may be also empty.
pub fn is_empty(&self) -> bool[src]
Returns true if no item is stored in the array.
pub fn at(&self, index: usize) -> MultiArrayViewItemIter<'a, Ts>[src]
Returns a read-only iterator to the elements of the item at position
index.
Panics
Panics if index is greater than or equal to MultiArrayView::len().
pub fn slice<R: RangeBounds<usize>>(&self, range: R) -> Self[src]
Slice this array view by a given range.
Panics
Panics if the range is outside of bounds of array view.
pub fn iter(&self) -> MultiArrayViewIter<'a, Ts>[src]
Returns an iterator through the indexed items of the array.
Trait Implementations
impl<'a, Ts: Clone> Clone for MultiArrayView<'a, Ts> where
Ts: VariadicRefFactory, [src]
Ts: VariadicRefFactory,
fn clone(&self) -> MultiArrayView<'a, Ts>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<'a, Ts: 'a> IntoIterator for MultiArrayView<'a, Ts> where
Ts: VariadicRefFactory, [src]
Ts: VariadicRefFactory,
type Item = <MultiArrayViewIter<'a, Ts> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = MultiArrayViewIter<'a, Ts>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, '_, Ts: 'a> IntoIterator for &'_ MultiArrayView<'a, Ts> where
Ts: VariadicRefFactory, [src]
Ts: VariadicRefFactory,
type Item = <MultiArrayViewIter<'a, Ts> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = MultiArrayViewIter<'a, Ts>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, Ts: 'a> Debug for MultiArrayView<'a, Ts> where
Ts: VariadicRefFactory, [src]
Ts: VariadicRefFactory,
Auto Trait Implementations
impl<'a, Ts> Sync for MultiArrayView<'a, Ts> where
Ts: Sync,
<Ts as VariadicStruct<'a>>::Index: Sync,
Ts: Sync,
<Ts as VariadicStruct<'a>>::Index: Sync,
impl<'a, Ts> Unpin for MultiArrayView<'a, Ts> where
Ts: Unpin,
<Ts as VariadicStruct<'a>>::Index: Unpin,
Ts: Unpin,
<Ts as VariadicStruct<'a>>::Index: Unpin,
impl<'a, Ts> Send for MultiArrayView<'a, Ts> where
Ts: Send,
<Ts as VariadicStruct<'a>>::Index: Send,
Ts: Send,
<Ts as VariadicStruct<'a>>::Index: Send,
impl<'a, Ts> UnwindSafe for MultiArrayView<'a, Ts> where
Ts: UnwindSafe,
<Ts as VariadicStruct<'a>>::Index: UnwindSafe,
Ts: UnwindSafe,
<Ts as VariadicStruct<'a>>::Index: UnwindSafe,
impl<'a, Ts> RefUnwindSafe for MultiArrayView<'a, Ts> where
Ts: RefUnwindSafe,
<Ts as VariadicStruct<'a>>::Index: RefUnwindSafe,
Ts: RefUnwindSafe,
<Ts as VariadicStruct<'a>>::Index: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,