enum OffsetSizeBytes {
One = 1,
Two = 2,
Three = 3,
Four = 4,
}
Variants§
Implementations§
Source§impl OffsetSizeBytes
impl OffsetSizeBytes
Sourcefn try_new(offset_size_minus_one: u8) -> Result<Self, ArrowError>
fn try_new(offset_size_minus_one: u8) -> Result<Self, ArrowError>
Build from the offset_size_minus_one
bits (see spec).
Sourcefn unpack_usize(
&self,
bytes: &[u8],
byte_offset: usize,
offset_index: usize,
) -> Result<usize, ArrowError>
fn unpack_usize( &self, bytes: &[u8], byte_offset: usize, offset_index: usize, ) -> Result<usize, ArrowError>
Return one unsigned little-endian value from bytes
.
bytes
– the Variant-metadata buffer.byte_offset
– number of bytes to skip before reading the first value (usually1
to move past the header byte).offset_index
– 0-based index after the skip (0
is the first value,1
the next, …).
Each value is self as usize
bytes wide (1, 2, 3 or 4).
Three-byte values are zero-extended to 32 bits before the final
fallible cast to usize
.
Trait Implementations§
Source§impl Clone for OffsetSizeBytes
impl Clone for OffsetSizeBytes
Source§fn clone(&self) -> OffsetSizeBytes
fn clone(&self) -> OffsetSizeBytes
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 OffsetSizeBytes
impl Debug for OffsetSizeBytes
Source§impl PartialEq for OffsetSizeBytes
impl PartialEq for OffsetSizeBytes
impl Copy for OffsetSizeBytes
impl StructuralPartialEq for OffsetSizeBytes
Auto Trait Implementations§
impl Freeze for OffsetSizeBytes
impl RefUnwindSafe for OffsetSizeBytes
impl Send for OffsetSizeBytes
impl Sync for OffsetSizeBytes
impl Unpin for OffsetSizeBytes
impl UnwindSafe for OffsetSizeBytes
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