pub struct PeekNdArray<'mem, 'facet> { /* private fields */ }Expand description
Lets you read from an n-dimensional array (implements read-only facet_core::NdArrayVTable proxies)
Implementations§
Source§impl<'mem, 'facet> PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> PeekNdArray<'mem, 'facet>
Sourcepub fn new(value: Peek<'mem, 'facet>, def: NdArrayDef) -> Self
pub fn new(value: Peek<'mem, 'facet>, def: NdArrayDef) -> Self
Creates a new peek array
Sourcepub fn get(&self, index: usize) -> Option<Peek<'mem, 'facet>>
pub fn get(&self, index: usize) -> Option<Peek<'mem, 'facet>>
Get an item from the array at the specified index
Sourcepub fn as_ptr(&self) -> Result<PtrConst, StrideError>
pub fn as_ptr(&self) -> Result<PtrConst, StrideError>
Get a pointer to the start of the array
Sourcepub fn byte_stride(&self, i: usize) -> Result<Option<isize>, StrideError>
pub fn byte_stride(&self, i: usize) -> Result<Option<isize>, StrideError>
Get the i-th stride of the array in bytes
Sourcepub fn def(&self) -> NdArrayDef
pub fn def(&self) -> NdArrayDef
Def getter
Trait Implementations§
Source§impl<'mem, 'facet> Clone for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> Clone for PeekNdArray<'mem, 'facet>
Source§fn clone(&self) -> PeekNdArray<'mem, 'facet>
fn clone(&self) -> PeekNdArray<'mem, 'facet>
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 Debug for PeekNdArray<'_, '_>
impl Debug for PeekNdArray<'_, '_>
impl<'mem, 'facet> Copy for PeekNdArray<'mem, 'facet>
Auto Trait Implementations§
impl<'mem, 'facet> Freeze for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> RefUnwindSafe for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> !Send for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> !Sync for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> Unpin for PeekNdArray<'mem, 'facet>
impl<'mem, 'facet> UnwindSafe for PeekNdArray<'mem, 'facet>
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