pub struct ArrayView<'a> { /* private fields */ }Expand description
A zero-copy view over an encoded ProtoCache array.
Implementations§
Source§impl<'a> ArrayView<'a>
impl<'a> ArrayView<'a>
Sourcepub fn detect_len(words: &'a [u32]) -> Option<usize>
pub fn detect_len(words: &'a [u32]) -> Option<usize>
Detects the complete encoded array length, including referenced items.
Sourcepub fn detect(words: &'a [u32]) -> Option<&'a [u32]>
pub fn detect(words: &'a [u32]) -> Option<&'a [u32]>
Returns the exact encoded slice occupied by a valid array.
pub fn is_empty(self) -> bool
pub fn width(self) -> usize
Sourcepub fn field(self, index: usize) -> Option<FieldView<'a>>
pub fn field(self, index: usize) -> Option<FieldView<'a>>
Returns a raw field view for the element at index.
pub fn expect_field(self, index: usize) -> FieldView<'a>
pub fn scalars<T: Scalar>(self) -> Option<ScalarArray<'a, T>>
pub fn expect_scalars<T: Scalar>(self) -> ScalarArray<'a, T>
pub fn iter(self) -> ArrayIter<'a> ⓘ
Trait Implementations§
impl<'a> Copy for ArrayView<'a>
Auto Trait Implementations§
impl<'a> Freeze for ArrayView<'a>
impl<'a> RefUnwindSafe for ArrayView<'a>
impl<'a> Send for ArrayView<'a>
impl<'a> Sync for ArrayView<'a>
impl<'a> Unpin for ArrayView<'a>
impl<'a> UnsafeUnpin for ArrayView<'a>
impl<'a> UnwindSafe for ArrayView<'a>
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