pub struct BytesTapeView<'a, Offset: OffsetType = i32> { /* private fields */ }Expand description
Binary bytes view over RawTapeView.
Implementations§
Source§impl<'a, Offset: OffsetType> BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> BytesTapeView<'a, Offset>
Sourcepub unsafe fn from_raw_parts(data: &'a [u8], offsets: &'a [Offset]) -> Self
pub unsafe fn from_raw_parts(data: &'a [u8], offsets: &'a [Offset]) -> Self
Creates a zero-copy BytesTapeView from raw Arrow BinaryArray parts.
§Safety
The caller must ensure that:
datacontains valid bytes for the lifetime'aoffsetscontains valid offsets with appropriate length- All offsets are within bounds of the data slice
Sourcepub fn get(&self, index: usize) -> Option<&[u8]>
pub fn get(&self, index: usize) -> Option<&[u8]>
Returns a reference to the bytes at the given index, or None if out of bounds.
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> &[u8] ⓘ
pub unsafe fn get_unchecked(&self, index: usize) -> &[u8] ⓘ
Returns a reference to the bytes at the given index without bounds checking.
§Safety
Caller must ensure index < self.len().
Sourcepub fn subview(
&self,
start: usize,
end: usize,
) -> Result<BytesTapeView<'a, Offset>, StringTapeError>
pub fn subview( &self, start: usize, end: usize, ) -> Result<BytesTapeView<'a, Offset>, StringTapeError>
Creates a sub-view of this view
Sourcepub fn as_raw_parts(&self) -> RawParts<Offset>
pub fn as_raw_parts(&self) -> RawParts<Offset>
Returns the raw parts of the view for Apache Arrow compatibility.
Sourcepub fn iter(&'a self) -> BytesTapeViewIter<'a, Offset> ⓘ
pub fn iter(&'a self) -> BytesTapeViewIter<'a, Offset> ⓘ
Returns an iterator over the byte slices in this view.
Source§impl<'a, Offset: OffsetType> BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> BytesTapeView<'a, Offset>
pub fn try_into_chars_view( self, ) -> Result<CharsTapeView<'a, Offset>, StringTapeError>
Trait Implementations§
Source§impl<'a, Offset: OffsetType> Debug for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> Debug for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> From<CharsTapeView<'a, Offset>> for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> From<CharsTapeView<'a, Offset>> for BytesTapeView<'a, Offset>
Source§fn from(chars_view: CharsTapeView<'a, Offset>) -> Self
fn from(chars_view: CharsTapeView<'a, Offset>) -> Self
Converts to this type from the input type.
Source§impl<'a, Offset: OffsetType> Hash for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> Hash for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> Index<usize> for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> Index<usize> for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> IntoIterator for &'a BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> IntoIterator for &'a BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> Ord for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> Ord for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> PartialEq for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> PartialEq for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> PartialOrd for BytesTapeView<'a, Offset>
impl<'a, Offset: OffsetType> PartialOrd for BytesTapeView<'a, Offset>
Source§impl<'a, Offset: OffsetType> TryFrom<BytesTapeView<'a, Offset>> for CharsTapeView<'a, Offset>
impl<'a, Offset: OffsetType> TryFrom<BytesTapeView<'a, Offset>> for CharsTapeView<'a, Offset>
Source§type Error = StringTapeError
type Error = StringTapeError
The type returned in the event of a conversion error.
impl<'a, Offset: OffsetType> Eq for BytesTapeView<'a, Offset>
impl<Offset: OffsetType + Send> Send for BytesTapeView<'_, Offset>
impl<Offset: OffsetType + Sync> Sync for BytesTapeView<'_, Offset>
Auto Trait Implementations§
impl<'a, Offset> Freeze for BytesTapeView<'a, Offset>
impl<'a, Offset> RefUnwindSafe for BytesTapeView<'a, Offset>where
Offset: RefUnwindSafe,
impl<'a, Offset> Unpin for BytesTapeView<'a, Offset>
impl<'a, Offset> UnwindSafe for BytesTapeView<'a, Offset>where
Offset: RefUnwindSafe,
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