pub struct ArrayDataView<D> { /* private fields */ }
Expand description
A view into the data of an array of objects.
This struct contains the start offset of the array and the number of objects in the array.
To iterate over the objects, use ArrayDataView::iter
.
Implementations§
Source§impl<D> ArrayDataView<D>
impl<D> ArrayDataView<D>
Sourcepub fn new(start: PolicyOffset, count: u32) -> Self
pub fn new(start: PolicyOffset, count: u32) -> Self
Creates a new array data view from the start offset and count.
Sourcepub fn iter(self, policy_data: &PolicyData) -> ArrayDataViewIter<D> ⓘ
pub fn iter(self, policy_data: &PolicyData) -> ArrayDataViewIter<D> ⓘ
Iterates over the objects in the array.
The iterator returns views into the objects in the array.
This function requires the policy data to be provided to the iterator because objects in the array may have variable size.
Trait Implementations§
Source§impl<D: Clone> Clone for ArrayDataView<D>
impl<D: Clone> Clone for ArrayDataView<D>
Source§fn clone(&self) -> ArrayDataView<D>
fn clone(&self) -> ArrayDataView<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<D: Debug> Debug for ArrayDataView<D>
impl<D: Debug> Debug for ArrayDataView<D>
impl<D: Copy> Copy for ArrayDataView<D>
Auto Trait Implementations§
impl<D> Freeze for ArrayDataView<D>
impl<D> RefUnwindSafe for ArrayDataView<D>where
D: RefUnwindSafe,
impl<D> Send for ArrayDataView<D>where
D: Send,
impl<D> Sync for ArrayDataView<D>where
D: Sync,
impl<D> Unpin for ArrayDataView<D>where
D: Unpin,
impl<D> UnwindSafe for ArrayDataView<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more